Skip to content

Commit 13585f1

Browse files
committed
GetOutboundPinholeTimeout: check args
1 parent bec6cce commit 13585f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: miniupnpd/upnpsoap.c

+7
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,13 @@ GetOutboundPinholeTimeout(struct upnphttp * h, const char * action, const char *
18501850
rem_port = GetValueFromNameValueList(&data, "RemotePort");
18511851
protocol = GetValueFromNameValueList(&data, "Protocol");
18521852

1853+
if (!int_port || !ext_port || !protocol)
1854+
{
1855+
ClearNameValueList(&data);
1856+
SoapError(h, 402, "Invalid Args");
1857+
return;
1858+
}
1859+
18531860
rport = (unsigned short)atoi(rem_port);
18541861
iport = (unsigned short)atoi(int_port);
18551862
/*proto = atoi(protocol);*/

0 commit comments

Comments
 (0)