-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/protodelim: fix handling of io.EOF
Before this change, when encountering an io.EOF after reading at least one byte, the zero value byte was — incorrectly — appended to sizeBuf, and the io.EOF was ignored, resulting in a complete varint (0 has no continuation bit), which in turn resulted in incorrect unmarshalling. Change-Id: If06d45039d998eaddf91d0864814bb31d4cb7ae0 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/505555 Reviewed-by: Lasse Folger <[email protected]> Reviewed-by: Damien Neil <[email protected]>
- Loading branch information
1 parent
fc47fdd
commit 59a8581
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters