Fix upnp when checking for "http://" in control_url there is an improper substr call

This commit is contained in:
Andrew Resch 2009-05-31 02:41:59 +00:00
parent 6dc55bb77c
commit d230dfaf3a
2 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ release 0.14.4
* fixed bug when force-checking a torrent with partial pieces
* fixed memory leak in disk cache
* fixed torrent file path vulnerability
* fixed upnp
release 0.14.3

View File

@ -903,7 +903,7 @@ void upnp::on_upnp_xml(error_code const& e
}
}
if (!s.url_base.empty() && s.control_url.substr(7) != "http://")
if (!s.url_base.empty() && s.control_url.substr(0, 7) != "http://")
{
// avoid double slashes in path
if (s.url_base[s.url_base.size()-1] == '/'