naphaso / cbor-cpp

CBOR C++ serialization library
75 stars 29 forks source link

Wrong decoding of negative numbers and no support for boolean and null values #7

Open bialix opened 8 years ago

bialix commented 8 years ago

This is CBOR byte stream I've used to test different types and values. I found problems with negative integer values < -16 and also not supported types boolean and null. For the latters there is awaiting pull request.

B4 63 70 31 36 10 63 75 6E 69 76 E9 80 9A E8 A8 8A E9 80 A3 E6 8E A5 E5 9F A0 20 28 43 4F 4D 31 29 62 6E 31 20 65 61 73 63 69 69 65 68 65 6C 6C 6F 63 6E 69 6C F6 69 65 6D 70 74 79 5F 61 72 72 80 66 70 36 35 35 33 35 19 FF FF 63 62 69 6E 43 31 32 55 63 6E 32 47 3A 7F FF FF FF 62 70 31 01 66 6E 36 35 35 33 35 39 FF FE 63 6E 31 36 2F 64 7A 65 72 6F 00 63 61 72 72 83 01 02 03 63 6F 62 6A A1 63 66 6F 6F 63 62 61 72 66 62 66 61 6C 73 65 F4 64 70 32 35 35 18 FF 63 70 32 47 1A 80 00 00 00 64 6E 32 35 35 38 FE 65 62 74 72 75 65 F5

It's easy to test what should be decoded on site http://cbor.me/