commit | 1d06f93345aa70f41a5770c2035eea5170a05494 | [log] [tgz] |
---|---|---|
author | Tamir Duberstein <tamird@google.com> | Tue Aug 03 16:56:26 2021 -0400 |
committer | Tamir Duberstein <tamird@google.com> | Tue Aug 03 21:05:42 2021 +0000 |
tree | 93e6ff909fe2dbf454c13b4a96e995e0b7628c4f | |
parent | 83fcc631664e345f9bd0214d4f5eb470d87e6207 [diff] |
Avoid deprecated method The two-parameter overload of SetTotalBytesLimit was removed in https://github.com/protocolbuffers/protobuf/commit/cda7954; since we are looking to upgrade protobuf past that revision, we need to migrate to the single-parameter overload. This patch is necessary because we cannot move to a more recent version of gRPC until https://github.com/grpc/grpc/pull/26869 is landed due to the use of wyhash and its UNLICENSE. Change-Id: I226fea814226febaf1c5e5206d3eba3d415e9bdf Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/grpc/+/564026 Reviewed-by: James Robinson <jamesr@google.com>
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index b763603..61c35bf 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h
@@ -221,7 +221,7 @@ return reader.status(); } ::grpc::protobuf::io::CodedInputStream decoder(&reader); - decoder.SetTotalBytesLimit(INT_MAX, INT_MAX); + decoder.SetTotalBytesLimit(INT_MAX); if (!msg->ParseFromCodedStream(&decoder)) { result = Status(StatusCode::INTERNAL, msg->InitializationErrorString()); }