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

`CBORParser` need to validate zero-length byte[] for `BigInteger` #261

Closed cowtowncoder closed 3 years ago

cowtowncoder commented 3 years ago

(from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32250)

Note: similar to #257, CBOR parser should have special handling for case of trying to construct BigInteger from 0-length byte array. Seems reasonable to just construct BigInteger.ZERO for such case.