You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in a review for a proposed change, the merge implementation for strings breaks the UTF-8 invariant of a String value modified in place, in case when wire data being merged are not valid UTF-8.
The text was updated successfully, but these errors were encountered:
To fix this, I need would like to understand if there is a reason why bytes::merge and string::merge do not clear the field value before extending it with the wire data. My reading of the protobuf spec suggests that the implementation should replace the value of a non-repeating field if it's seen in the same message multiple times, but bytes::merge appends to the value instead.
As noted in a review for a proposed change, the
merge
implementation for strings breaks the UTF-8 invariant of aString
value modified in place, in case when wire data being merged are not valid UTF-8.The text was updated successfully, but these errors were encountered: