mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
Fix nullptr deref in Poco::JSON::Object (#2150)
This commit is contained in:
committed by
Alex Fabijanic
parent
d9bff00222
commit
bdd0478ead
@@ -346,8 +346,7 @@ inline bool Object::isArray(const std::string& key) const
|
||||
|
||||
inline bool Object::isArray(ConstIterator& it) const
|
||||
{
|
||||
const std::type_info& ti = it->second.type();
|
||||
return it != _values.end() && (ti == typeid(Array::Ptr) || ti == typeid(Array));
|
||||
return it != _values.end() && (it->second.type() == typeid(Array::Ptr) || it->second.type() == typeid(Array));
|
||||
}
|
||||
|
||||
|
||||
@@ -367,8 +366,7 @@ inline bool Object::isObject(const std::string& key) const
|
||||
|
||||
inline bool Object::isObject(ConstIterator& it) const
|
||||
{
|
||||
const std::type_info& ti = it->second.type();
|
||||
return it != _values.end() && (ti == typeid(Object::Ptr) || ti == typeid(Object));
|
||||
return it != _values.end() && (it->second.type() == typeid(Object::Ptr) || it->second.type() == typeid(Object));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user