Copilot commented on code in PR #3329:
URL: https://github.com/apache/brpc/pull/3329#discussion_r3360007640
##########
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:
Use unsigned literals for message_length bounds to match the surrounding
checks (e.g. `!= 4u`) and avoid signed/unsigned comparison warnings for
`uint32_t message_length`.
--
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]