liteserver / binn

Binary Serialization
Apache License 2.0
440 stars 58 forks source link

binn_map_get_blob() fails if blob size is 1 byte #29

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello,

Below is a valid map:

e1:0f:01:00:00:00:01:c0:00:00:00:03:41:41:41

It contains a key 1, which points to a blob of AAA (41:41:41). The blob size uses 4-bytes: 00:00:00:03.

However when blob size uses 1 byte 03, binn_map_get_blob() fails. According to specification, size can be either 1 or 4 bytes.

May I ask if you could check?

Thank you,

ghost commented 4 years ago

I think in your implementation, blob always uses 4-byte size. I'll file new issue.