breese / trial.protocol

Network wire protocols
11 stars 4 forks source link

Parser gets confused on non-NULL terminated string #46

Closed vinipsmaker closed 4 years ago

vinipsmaker commented 4 years ago

While working on batches of JSONs stored in a file, I've stumbled upon this error. I'd normally provide an accompanying fix, but I think you'll have way easier time delving in the decoding layers due to code familiarity.

Pull #45 provides a test. It's just a copy'n'paste of an already existing test, but changing the input to move the NULL terminator further away in the byte sequence.

breese commented 4 years ago

Fixed in 17e606b0a193cd2db9f44b3cc35d43cfb91cdb89