wwbmmm commented on code in PR #3404:
URL: https://github.com/apache/brpc/pull/3404#discussion_r3651564629
##########
src/brpc/redis_reply.cpp:
##########
@@ -141,6 +141,11 @@ ParseError RedisReply::ConsumePartialIOBuf(butil::IOBuf&
buf, int depth) {
return PARSE_ERROR_NOT_ENOUGH_DATA;
}
const size_t len = str.size() - 1;
+ if (len > (size_t)FLAGS_redis_max_allocation_size) {
+ LOG(ERROR) << "simple string exceeds max allocation size! max="
+ << FLAGS_redis_max_allocation_size << ", actually=" <<
len;
+ return PARSE_ERROR_ABSOLUTELY_WRONG;
+ }
Review Comment:
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]