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 issue wit input offsets when parsing CBOR from `InputStream` #178

Closed iziamos closed 5 years ago

iziamos commented 5 years ago

This fixes an issue I discovered where CBORParser#_loadToHaveAtLeast didn't increment _currInputProcessed pointer if array move didn't occur. Observed because calling CBORParser#getCurrentLocation after CBORParser#finishToken returned offsets smaller than expected if a token spanned between two chunks read from the stream.

cowtowncoder commented 5 years ago

@iziamos Thank you for reporting the problem, submitting the fix! I merged this manually so it can go in 2.10 (master is for 3.x), and will be in 2.10.0.