miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GetGenericPortMapping false positive

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Tue May 14, 2013 6:18 pm    Post subject: GetGenericPortMapping false positive Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Tue May 14, 2013 9:29 pm    Post subject: Reply with quote

this should be fixed too. using strtol()
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Thu May 16, 2013 10:44 am    Post subject: Reply with quote

Please tell me how behave this patch : https://github.com/miniupnp/miniupnp/commit/51563f038a5b4a686eccad60a740ec7ae19a7217

Regards
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Mon May 20, 2013 8:41 pm    Post subject: Reply with quote

This change seems to be working fine. Any idea on when a new version will be released?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Tue May 21, 2013 9:02 am    Post subject: Reply with quote

twear wrote:
This change seems to be working fine. Any idea on when a new version will be released?

here : miniupnpd-1.8.20130521.tar.gz
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Tue May 21, 2013 8:18 pm    Post subject: Reply with quote

You are awesome man, thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.