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

Avoid integer overflow when parsing cbor negative numbers #125

Closed JacekLach closed 6 years ago

JacekLach commented 6 years ago

Fixes #124

I couldnt get the master branch to build:

[FATAL] Non-resolvable parent POM for com.fasterxml.jackson.dataformat:jackson-dataformats-binary:3.0.0-SNAPSHOT: Could not find artifact com.fasterxml.jackson:jackson-base:pom:3.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 11

So I made this against 2.9. I expect it should be easy to move to master if desired.

cowtowncoder commented 6 years ago

To build master you need to build some of the dependencies locally. I can try to see if there's a way to push snapshot builds of some of the deps. But PR for 2.9 makes sense regardless since I can merge forward easily (but not back from master).

Thank you for submitting this.

cowtowncoder commented 6 years ago

Ok, I will have to read this through a few times to fully grok it. I assume tests make sense but it seems like there should be slightly simpler coercions for edge cases (avoid one operation at least).

JacekLach commented 6 years ago

Possibly; I just did the same thing that was done for the positive numbers.