mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
#3076: Avoid access to already freed memory in JSON code
This commit is contained in:
@@ -443,7 +443,6 @@ inline std::size_t Object::size() const
|
||||
|
||||
inline void Object::remove(const std::string& key)
|
||||
{
|
||||
_values.erase(key);
|
||||
if (_preserveInsOrder)
|
||||
{
|
||||
KeyList::iterator it = _keys.begin();
|
||||
@@ -457,6 +456,7 @@ inline void Object::remove(const std::string& key)
|
||||
}
|
||||
}
|
||||
}
|
||||
_values.erase(key);
|
||||
_modified = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user