hashberg-io / dag-cbor

Python implementation of the DAG-CBOR codec for IPLD.
https://dag-cbor.readthedocs.io
MIT License
13 stars 6 forks source link

Failure to enforce canonical representation for small integers. #8

Closed sg495 closed 9 months ago

sg495 commented 1 year ago

In _decode_head, under the additional_info == 24 branch, we must raise error if the next byte contains a value less than 24, since that should have been encoded as the additional_info instead.