sahvx655-wq commented on code in PR #3329:
URL: https://github.com/apache/brpc/pull/3329#discussion_r3415786357
##########
src/brpc/policy/rtmp_protocol.cpp:
##########
@@ -1925,8 +1925,8 @@ bool RtmpChunkStream::OnSetPeerBandwidth(
bool RtmpChunkStream::OnUserControlMessage(
const RtmpMessageHeader& mh, butil::IOBuf* msg_body, Socket* socket) {
- if (mh.message_length > 32) {
- RTMP_ERROR(socket, mh) << "No user control message long as "
+ if (mh.message_length < 2 || mh.message_length > 32) {
Review Comment:
Good point. Pushed making both bounds 2u/32u so they line up with the != 4u
/ != 5u siblings and the uint32_t message_length. No behaviour change, just
removes the signed/unsigned mismatch on the comparison.
--
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]