ssdpDiscoverDevices() set error

This commit is contained in:
Thomas Bernard 2015-10-26 11:35:09 +01:00
parent bbbbb0c95a
commit 899ccb9575
1 changed files with 4 additions and 4 deletions

View File

@ -685,10 +685,10 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
(linklocal ? "[" UPNP_MCAST_LL_ADDR "]" : "[" UPNP_MCAST_SL_ADDR "]")
: UPNP_MCAST_ADDR,
deviceTypes[deviceIndex], mx);
if ((unsigned int)n >= sizeof(bufr))
{
closesocket(sudp);
return NULL;
if ((unsigned int)n >= sizeof(bufr)) {
if(error)
*error = MINISSDPC_MEMORY_ERROR;
goto error;
}
#ifdef DEBUG
/*printf("Sending %s", bufr);*/