fix previous commit 53804c3db

allow calling UPNP_GetValidIGD() with lanaddr=NULL
This commit is contained in:
Thomas Bernard 2015-12-11 17:48:43 +01:00
parent 53804c3db3
commit 6e8fda2358
1 changed files with 2 additions and 1 deletions

View File

@ -587,7 +587,8 @@ UPNP_GetValidIGD(struct UPNPDev * devlist,
{ {
desc[i].is_igd = 1; desc[i].is_igd = 1;
n_igd++; n_igd++;
strncpy(lanaddr, myLanAddr, lanaddrlen); if(lanaddr)
strncpy(lanaddr, myLanAddr, lanaddrlen);
} }
} }
} }