P3KI / bendy

A rust library for encoding and decoding bencode with enforced cannonicalization rules.
BSD 3-Clause "New" or "Revised" License
75 stars 14 forks source link

Add deserializer option to forbid trailing bytes #34

Closed casey closed 4 years ago

casey commented 4 years ago

Optionally, the deserializer can be configured to throw an error if trailing bytes remain after deserialization.

I'm writing a tool to verify a huge archive of torrents, and I want to be able to be strict about trailing data not following a valid bencoded dict.

thequux commented 4 years ago

I'm really sorry that I missed seeing this earlier! In the future, if I leave a PR open like this without anybody commenting, feel free to @ me.

casey commented 4 years ago

No worries, thanks for merging!