-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/encoding/messageset: don't modify input data when unmarshaling
When combining multiple message fields in a MessageSet item (a case which should never happen in practice), unmarshal could modify the input data. Fix it to not do so. Add a general check to ensure that unmarshal operations don't modify the input. Change-Id: Idde46e6132a1dc96c374f9146efff81783c3bef3 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/223818 Reviewed-by: Joe Tsai <joetsai@google.com>
- Loading branch information
Showing
2 changed files
with
10 additions
and
5 deletions.
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