View previous topic :: View next topic |
Author |
Message |
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Tue May 14, 2013 6:18 pm Post subject: GetGenericPortMapping false positive |
|
|
I found a slight bug in the GetGenericPortMapping
Code: | if(!m_index)
{
ClearNameValueList(&data);
SoapError(h, 402, "Invalid Args");
return;
}
index = (int)atoi(m_index); |
Most clients will check to make sure that they send an integer value, but I ran into one which did not. Instead it sent a string, so m_index passed and atoi returned 0 as it should. But I believe an error should be returned instead of passing back the first portmapping entry. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1518
|
Posted: Tue May 14, 2013 9:29 pm Post subject: |
|
|
this should be fixed too. using strtol() _________________ Main miniUPnP author.
http://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1518
|
|
Back to top |
|
 |
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Mon May 20, 2013 8:41 pm Post subject: |
|
|
This change seems to be working fine. Any idea on when a new version will be released? |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1518
|
|
Back to top |
|
 |
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Tue May 21, 2013 8:18 pm Post subject: |
|
|
You are awesome man, thanks |
|
Back to top |
|
 |
|