FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
310 stars 133 forks source link

Fix for 451: Add negative index checking for token retrieval #452

Closed arthurscchan closed 8 months ago

arthurscchan commented 8 months ago

This PR provides a suggested fix for #451 by adding a negative index checking in CBORParser to ensure that the index _inputPtr is not negative in additional to the original check to ensure it is not larger than or equals to the length of the input.

cowtowncoder commented 8 months ago

Thank you again, @arthurscchan ! Modified fix a bit, should resolve the issue.