disable-utf8-validation-at-release.patch 821 B

1234567891011121314151617181920212223
  1. --- a/src/google/protobuf/wire_format_lite.cc
  2. +++ b/src/google/protobuf/wire_format_lite.cc
  3. @@ -604,6 +604,7 @@
  4. void PrintUTF8ErrorLog(absl::string_view message_name,
  5. absl::string_view field_name, const char* operation_str,
  6. bool emit_stacktrace) {
  7. + #ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
  8. TProtoStringType stacktrace;
  9. (void)emit_stacktrace; // Parameter is used by Google-internal code.
  10. std::string quoted_field_name = "";
  11. @@ -624,6 +625,12 @@
  12. "send raw bytes. ",
  13. stacktrace);
  14. ABSL_LOG(ERROR) << error_message;
  15. + #else
  16. + (void)message_name;
  17. + (void)field_name;
  18. + (void)emit_stacktrace;
  19. + (void)operation_str;
  20. + #endif
  21. }
  22. bool WireFormatLite::VerifyUtf8String(const char* data, int size, Operation op,