Merge pull request #666 from ben-31/fix_malloc_error
minissdpc.c: fix memory allocation error
This commit is contained in:
commit
a5fd382e95
|
@ -338,7 +338,7 @@ receiveDevicesFromMiniSSDPD(int s, int * error)
|
|||
#ifdef DEBUG
|
||||
printf(" usnsize=%u\n", usnsize);
|
||||
#endif /* DEBUG */
|
||||
tmp = (struct UPNPDev *)malloc(sizeof(struct UPNPDev)+urlsize+stsize+usnsize);
|
||||
tmp = (struct UPNPDev *)malloc(sizeof(struct UPNPDev)+urlsize+stsize+usnsize+3);
|
||||
if(tmp == NULL) {
|
||||
if (error)
|
||||
*error = MINISSDPC_MEMORY_ERROR;
|
||||
|
|
Loading…
Reference in New Issue