GetOutboundPinholeTimeout: check args

This commit is contained in:
Thomas Bernard 2018-12-18 22:54:51 +01:00
parent bec6ccec63
commit 13585f15c7
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 7 additions and 0 deletions

View File

@ -1850,6 +1850,13 @@ GetOutboundPinholeTimeout(struct upnphttp * h, const char * action, const char *
rem_port = GetValueFromNameValueList(&data, "RemotePort");
protocol = GetValueFromNameValueList(&data, "Protocol");
if (!int_port || !ext_port || !protocol)
{
ClearNameValueList(&data);
SoapError(h, 402, "Invalid Args");
return;
}
rport = (unsigned short)atoi(rem_port);
iport = (unsigned short)atoi(int_port);
/*proto = atoi(protocol);*/