Skip to content

Commit

Permalink
Merge pull request #12725 from acozzette/cherrypick-12104-fix
Browse files Browse the repository at this point in the history
Fix crash in #12104 (cherry-pick)
  • Loading branch information
mkruskal-google authored May 9, 2023
2 parents 040a7cf + afa997d commit 74b12eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/google/protobuf/wire_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ inline size_t WireFormat::TagSize(int field_number,
inline void WireFormat::VerifyUTF8String(const char* data, int size,
WireFormat::Operation op) {
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
WireFormatLite::VerifyUtf8String(
data, size, static_cast<WireFormatLite::Operation>(op), nullptr);
WireFormatLite::VerifyUtf8String(data, size,
static_cast<WireFormatLite::Operation>(op),
/* field_name = */ "");
#else
// Avoid the compiler warning about unused variables.
(void)data;
Expand Down

0 comments on commit 74b12eb

Please sign in to comment.