mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
avformat/rdt: Check pkt_len
Fixes: CID1473553 Untrusted loop bound Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ca237a841e
commit
0d0373de3b
@ -206,6 +206,8 @@ ff_rdt_parse_header(const uint8_t *buf, int len,
|
||||
return -1; /* not followed by a data packet */
|
||||
|
||||
pkt_len = AV_RB16(buf+3);
|
||||
if (pkt_len > len)
|
||||
return AVERROR_INVALIDDATA;
|
||||
buf += pkt_len;
|
||||
len -= pkt_len;
|
||||
consumed += pkt_len;
|
||||
|
Loading…
Reference in New Issue
Block a user