Skip to content

Commit f321c20

Browse files
committed
upnp_redirect(): accept NULL desc argument
1 parent 13585f1 commit f321c20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: miniupnpd/upnpredirect.c

+4
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ upnp_redirect(const char * rhost, unsigned short eport,
356356
"%hu->%s:%hu %s", eport, iaddr, iport, protocol);
357357
return -3;
358358
}
359+
360+
if (desc == NULL)
361+
desc = ""; /* assume empty description */
362+
359363
/* IGDv1 (WANIPConnection:1 Service Template Version 1.01 / Nov 12, 2001)
360364
* - 2.2.20.PortMappingDescription :
361365
* Overwriting Previous / Existing Port Mappings:

0 commit comments

Comments
 (0)