cb0r icon indicating copy to clipboard operation
cb0r copied to clipboard

Minimal Zero-Footprint CBOR Decoder in C

Results 5 cb0r issues
Sort by recently updated
recently updated
newest added

Previously, writing simple types was not in line with the CBOR standard. Writing the array [false,true,null,undefined] would result in 84 38 54 75 96 which is totally off. This is...

Writing simple types is not in line with the CBOR standard. Trying to write the array `[false,true,null,undefined]` results in `84 38 54 75 96` which cannot be decoded e.g. with...

There is `if(number >= UINT32_MAX) {` and `if(number > UINT16_MAX) {`. Should the latter also be `>=`?

Adding the following to one of the unit tests shows the issue: ```c len = unhex("581868656c6c6f6f6f6f6f6f6f6f6f6f6f6f6f6f206e75727365",start); // ... fail_unless(memcmp(res->start+res->header,"helloooooooooooooo nurse",res->length) == 0); fail_unless(res->length == 24); // actual: 25 ``` PR...

`cb0r` was failing to decode data whose key was >23 bytes. This is because 23 is the largest value which does not include a length prefix, per the cbor spec....