fixed upnp bug that could cause stack overflow

This commit is contained in:
Arvid Norberg 2009-02-18 03:46:36 +00:00
parent 7fff6ace1b
commit 25dd5c86b9
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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;