From d230dfaf3a0ced5f1ca4188b996140213fa4d9c8 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 31 May 2009 02:41:59 +0000 Subject: [PATCH] Fix upnp when checking for "http://" in control_url there is an improper substr call --- ChangeLog | 1 + src/upnp.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2892e045a..a03bf47a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/upnp.cpp b/src/upnp.cpp index d9623cf70..ecc1fcef5 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -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] == '/'