You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
rtmp: Prevent reading outside of an allocate buffer when receiving server bandwidth packets
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
committed by
Martin Storsjö
parent
44dc9c6af0
commit
2357f60687
@@ -950,6 +950,13 @@ static int handle_server_bw(URLContext *s, RTMPPacket *pkt)
|
||||
{
|
||||
RTMPContext *rt = s->priv_data;
|
||||
|
||||
if (pkt->data_size < 4) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"Too short server bandwidth report packet (%d)\n",
|
||||
pkt->data_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
rt->server_bw = AV_RB32(pkt->data);
|
||||
if (rt->server_bw <= 0) {
|
||||
av_log(s, AV_LOG_ERROR, "Incorrect server bandwidth %d\n",
|
||||
|
Reference in New Issue
Block a user