blob: 564724c63bbf6f44575bd95eb52607b98f2d7d5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
diff --git a/src/brpc/protocol.cpp b/src/brpc/protocol.cpp
index 11297ea..c998edb 100644
--- a/src/brpc/protocol.cpp
+++ b/src/brpc/protocol.cpp
@@ -203,7 +203,7 @@ BUTIL_FORCE_INLINE bool ParsePbFromZeroCopyStreamInlined(
// According to source code of pb, SetTotalBytesLimit is not a simple set,
// avoid calling the function when the limit is definitely unreached.
if (PB_TOTAL_BYETS_LIMITS < FLAGS_max_body_size) {
- decoder.SetTotalBytesLimit(INT_MAX, -1);
+ decoder.SetTotalBytesLimit(INT_MAX);
}
return msg->ParseFromCodedStream(&decoder) && decoder.ConsumedEntireMessage();
}
|