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
In the ProtobufParser.currentName() method, there is an invocation of the ProtobufReadContext .getParent() method which could return a null value when the input is malformed and ended unexpectedly because there is no parent read context exists. If the result is null, the code will throw a NullPointerException in the next line when the ProtobufReadContext ::getCurrentName() method is called.
The suggested fix is to add a null checking after the invocation of the ProtobufReadContext .getParent() method and throw an exception if the return value stored in parent is indeed null.
cowtowncoder
changed the title
Unexpected NullPointerException in ProtobufParser
Unexpected NullPointerException in ProtobufParser.currentName()Jan 17, 2024
In the
ProtobufParser.currentName()
method, there is an invocation of theProtobufReadContext .getParent()
method which could return anull
value when the input is malformed and ended unexpectedly because there is no parent read context exists. If the result is null, the code will throw a NullPointerException in the next line when theProtobufReadContext ::getCurrentName()
method is called.The suggested fix is to add a null checking after the invocation of the
ProtobufReadContext .getParent()
method and throw an exception if the return value stored inparent
is indeed null.We found this issue by OSS-Fuzz and it is reported in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65674.
The text was updated successfully, but these errors were encountered: