aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-01-19 11:44:42 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-19 11:44:42 -0800
commit1d77059e4b1ec17c704acfc876e321cc33bff99d (patch)
tree864bec0e4350b7b823d9b4da634ab1f30374a630 /include/grpc++
parent62f28bfcf0cdda607278542566ddfc0a7cbd9f00 (diff)
Fix integer overflow
Diffstat (limited to 'include/grpc++')
-rw-r--r--include/grpc++/impl/codegen/proto_utils.h2
-rw-r--r--include/grpc++/impl/codegen/sync_stream.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h
index acaa48afee..2123b62ed9 100644
--- a/include/grpc++/impl/codegen/proto_utils.h
+++ b/include/grpc++/impl/codegen/proto_utils.h
@@ -214,7 +214,7 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of<
return reader.status();
}
::grpc::protobuf::io::CodedInputStream decoder(&reader);
- decoder.SetTotalBytesLimit(UINT32_MAX, UINT32_MAX);
+ decoder.SetTotalBytesLimit(INT_MAX, INT_MAX);
if (!msg->ParseFromCodedStream(&decoder)) {
result = Status(StatusCode::INTERNAL, msg->InitializationErrorString());
}
diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h
index e0f9ba7701..1f7708bab9 100644
--- a/include/grpc++/impl/codegen/sync_stream.h
+++ b/include/grpc++/impl/codegen/sync_stream.h
@@ -160,7 +160,7 @@ class ClientReader final : public ClientReaderInterface<R> {
}
bool NextMessageSize(uint32_t* sz) override {
- *sz = UINT32_MAX;
+ *sz = INT_MAX;
return true;
}
@@ -310,7 +310,7 @@ class ClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
}
bool NextMessageSize(uint32_t* sz) override {
- *sz = UINT32_MAX;
+ *sz = INT_MAX;
return true;
}
@@ -382,7 +382,7 @@ class ServerReader final : public ServerReaderInterface<R> {
}
bool NextMessageSize(uint32_t* sz) override {
- *sz = UINT32_MAX;
+ *sz = INT_MAX;
return true;
}
@@ -474,7 +474,7 @@ class ServerReaderWriterBody final {
}
bool NextMessageSize(uint32_t* sz) {
- *sz = UINT32_MAX;
+ *sz = INT_MAX;
return true;
}