Fix missing ! making it so untyped_message would trigger a invalid Utf8 error IFF the string was _valid_ UTF8.

PiperOrigin-RevId: 597570464
pull/15399/head
Protobuf Team Bot 11 months ago committed by Copybara-Service
parent c988f9c0c7
commit fc982c0177
  1. 2
      src/google/protobuf/json/internal/untyped_message.cc

@ -468,7 +468,7 @@ absl::Status UntypedMessage::DecodeDelimited(io::CodedInputStream& stream,
}
if (field.proto().kind() == Field::TYPE_STRING) {
if (desc_->proto().syntax() == google::protobuf::SYNTAX_PROTO3 &&
utf8_range::IsStructurallyValid(buf)) {
!utf8_range::IsStructurallyValid(buf)) {
return MakeProto3Utf8Error();
}
}

Loading…
Cancel
Save