Closed OR13 closed 7 months ago
const cbor = require('cbor-web'); (async () => { console.log(await cbor.diagnose(Buffer.from('d28443a10126a0f75840430c3d8593664fcc91be9e636d188161224da282b47aec290590c208ec0f350098e658614270271c04b2292e13342eaa3f8449176b0da59ecfb941f84a616282', 'hex'))) console.log(await cbor.diagnose(Buffer.from('d28443a10126a0f65840e60e1afde353695c0aa6375e59f9f00cf48fdafe80bfd684d0b4fd001ed47078ead504c8d024baa85e4a659514868f7f74928fd5046bc78e9e8fdb202893ac4c', 'hex'))) })()
Expect payload to be primitive(22) for null and primitive(23) for undefined.
primitive(22)
null
primitive(23)
undefined
Both decode successfully on cbor.me
Reproduced with the input '81f6'
Fixed in 9.0.2
Expect payload to be
primitive(22)
fornull
andprimitive(23)
forundefined
.Both decode successfully on cbor.me