From 25dd5c86b96e2f765f51d9ed3f6947d31dc104bd Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 18 Feb 2009 03:46:36 +0000 Subject: [PATCH] fixed upnp bug that could cause stack overflow --- ChangeLog | 1 + src/upnp.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 88e5ce347..197d89146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,6 +61,7 @@ release 0.14.2 from resume data properly * removed locale dependency in xml parser (caused asserts on windows) * fixed bug when talking to https 1.0 servers + * fixed UPnP bug that could cause stack overflow release 0.14.1 diff --git a/src/upnp.cpp b/src/upnp.cpp index 5e1abdc39..819c35182 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -637,6 +637,7 @@ void upnp::update_map(rootdevice& d, int i) std::stringstream msg; msg << "mapping " << i << " does not need updating, skipping"; log(msg.str()); + m.action = mapping_t::action_none; next(d, i); return; } @@ -651,6 +652,7 @@ void upnp::update_map(rootdevice& d, int i) { if (m.failcount > 5) { + m.action = mapping_t::action_none; // giving up next(d, i); return;