mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/moflex: Check pkt_size
Fixes: Timeout (>20sec -> 1ms) Fixes: 26527/clusterfuzz-testcase-minimized-ffmpeg_dem_MOFLEX_fuzzer-6308307310215168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
42ccef2846
commit
40348637be
@ -316,6 +316,8 @@ static int moflex_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
|
||||
pkt_size = pop_int(br, pb, 13) + 1;
|
||||
if (pkt_size > m->size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
packet = s->streams[stream_index]->priv_data;
|
||||
if (!packet) {
|
||||
avio_skip(pb, pkt_size);
|
||||
|
Loading…
Reference in New Issue
Block a user