Monibuca / plugin-rtmp

RTMP协议插件,提供RTMP协议的server功能:接收rtmp推流和rtmp的播放功能
MIT License
94 stars 51 forks source link

RTMP的RecvMessage()函数会存在崩溃的可能 #22

Closed daxiong0327 closed 1 year ago

daxiong0327 commented 1 year ago

image

readChunk()在MessageTypeID 等于 RTMP_MSG_CHUNK_SIZE 时,存在body.Len()小于4的情况,这时chunk.MsgData将为nil,msg.MsgData 强转 Uint32Message 就会产生崩溃; image

langhuihui commented 1 year ago

return了啊,走不到下面

daxiong0327 commented 1 year ago

是走不到下面,所以崩溃了

image
langhuihui commented 1 year ago

哦哦,我加个判断err是否为空

daxiong0327 commented 1 year ago

👌