You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JsonToken::asObject() behaves in interesting ways given the following json:
{
}
In our code, we're getting access violation exceptions due to bogus pointer values, and the attached patch to UtilityJsonTest produces an odd error message:
Utility::JsonToken::find(): token is a parsed Utility::JsonToken::Type::Number, expected a parsed object
Argh, that was a silly unhandled corner case, especially with the comment next to it saying that "it should never happen". Sorry about that. Most of the uses of find() or operator[]() happen directly on a JsonToken, performing that on a JsonObjectView / JsonArrayView is a rather rare scenario which probably explains I never encountered this case so far.
Fixed in fa7fa30, and although I managed to find a case where this would produce a similar assertion (and another case where it'd just silently produce a wrong result), your patch triggered a plain segfault on a null pointer in my case, not the error you reported.
JsonToken::asObject()
behaves in interesting ways given the following json:In our code, we're getting access violation exceptions due to bogus pointer values, and the attached patch to UtilityJsonTest produces an odd error message:
corrade-14-15-21.patch
The text was updated successfully, but these errors were encountered: