You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readBigUInt and readBigNInt assume (https://github.com/well-typed/cborg/blob/master/cborg/src/Codec/CBOR/Read.hs#L2660) that the payload is a definite-length bytestring, although as far as I can see the specification merely says it his a "byte string data item", which I think means both definite and indefinite length bytestrings should be allowed.
Example (bigint tag, and then a random indefinite-length bytestring I got the library to make for me):
> let y :: Term = deserialise $ BSL.fromStrict (BS.pack [0xc2, 0x5f, 0x43, 0x6c, 0x6f, 0x6c, 0xff])
> y
*** Exception: DeserialiseFailure 0 "expected integer"
The text was updated successfully, but these errors were encountered:
readBigUInt
andreadBigNInt
assume (https://github.com/well-typed/cborg/blob/master/cborg/src/Codec/CBOR/Read.hs#L2660) that the payload is a definite-length bytestring, although as far as I can see the specification merely says it his a "byte string data item", which I think means both definite and indefinite length bytestrings should be allowed.Example (bigint tag, and then a random indefinite-length bytestring I got the library to make for me):
The text was updated successfully, but these errors were encountered: