jangko / msgpack4nim

MessagePack serializer/deserializer implementation for Nim / msgpack.org[Nim]
http://msgpack.org/
119 stars 21 forks source link

raise error if not enough bytes for string #53

Closed kit494way closed 4 years ago

kit494way commented 4 years ago

Before this change, string is unpacked incorrectly if there is not enough bytes for string.

Situation

There is not enough bytes for string.

Expected behavior

Raise AssertionError.

Current behavior

Unpack string with partial bytes, and continue deserializing.