Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
There is a bug in the Rust implementation of GenericSingleObjectReader::read_value, which is exposed when a call to reader.read reads less than 10 bytes. This is a valid scenario, as according to the documentation of Read::read, "It is not an error if the returned value n is smaller than the buffer size, even when the reader is not at the end of the stream yet." This is also a real-life scenario: in my use-case, I am chaining three implementations of the Read trait to messages that can be deserialized (one for the two magic bytes, one for the schema fingerprint, and one for the actual message content). Each call to Read::read only returns the bytes of one chain link, so the first call to Read::read only returns 2 bytes.
Attachments
Issue Links
- links to