AddAnyPortMapping: check against NULL
this avoids a crash in strcasecmp by passing an empty protocol argument
This commit is contained in:
parent
a613992892
commit
dedbee16b1
|
@ -598,7 +598,7 @@ AddAnyPortMapping(struct upnphttp * h, const char * action, const char * ns)
|
||||||
if(leaseduration == 0)
|
if(leaseduration == 0)
|
||||||
leaseduration = 604800;
|
leaseduration = 604800;
|
||||||
|
|
||||||
if (!int_ip || !ext_port || !int_port)
|
if (!int_ip || !ext_port || !int_port || !protocol)
|
||||||
{
|
{
|
||||||
ClearNameValueList(&data);
|
ClearNameValueList(&data);
|
||||||
SoapError(h, 402, "Invalid Args");
|
SoapError(h, 402, "Invalid Args");
|
||||||
|
|
Loading…
Reference in New Issue