Skip to content

Commit

Permalink
GetOutboundPinholeTimeout: check args
Browse files Browse the repository at this point in the history
  • Loading branch information
miniupnp committed Dec 18, 2018
1 parent bec6cce commit 13585f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions miniupnpd/upnpsoap.c
Expand Up @@ -1850,6 +1850,13 @@ GetOutboundPinholeTimeout(struct upnphttp * h, const char * action, const char *
rem_port = GetValueFromNameValueList(&data, "RemotePort"); rem_port = GetValueFromNameValueList(&data, "RemotePort");
protocol = GetValueFromNameValueList(&data, "Protocol"); protocol = GetValueFromNameValueList(&data, "Protocol");


if (!int_port || !ext_port || !protocol)
{
ClearNameValueList(&data);
SoapError(h, 402, "Invalid Args");
return;
}

rport = (unsigned short)atoi(rem_port); rport = (unsigned short)atoi(rem_port);
iport = (unsigned short)atoi(int_port); iport = (unsigned short)atoi(int_port);
/*proto = atoi(protocol);*/ /*proto = atoi(protocol);*/
Expand Down

0 comments on commit 13585f1

Please sign in to comment.