mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avformat/wavdec: Check that smv block fits in available space
Fixes: OOM
Fixes: 56271/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5290810045497344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a76efafdb9
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c31def00a5
commit
42cc45f5f2
@ -548,6 +548,10 @@ smv_retry:
|
|||||||
goto smv_out;
|
goto smv_out;
|
||||||
}
|
}
|
||||||
size = avio_rl24(s->pb);
|
size = avio_rl24(s->pb);
|
||||||
|
if (size > wav->smv_block_size) {
|
||||||
|
ret = AVERROR_EOF;
|
||||||
|
goto smv_out;
|
||||||
|
}
|
||||||
ret = av_get_packet(s->pb, pkt, size);
|
ret = av_get_packet(s->pb, pkt, size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto smv_out;
|
goto smv_out;
|
||||||
|
Loading…
Reference in New Issue
Block a user