mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 09:35:22 +00:00
avformat/voc_packet: Add a basic check on max_size
Fixes: signed integer overflow: -2147483648 - 4 cannot be represented in type 'int' Fixes: 28127/clusterfuzz-testcase-minimized-ffmpeg_dem_VOC_fuzzer-4880586455646208 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
498be38e32
commit
52f75181bf
@ -44,6 +44,8 @@ ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
|
||||
AVINDEX_KEYFRAME);
|
||||
|
||||
while (!voc->remaining_size) {
|
||||
if (max_size < 4)
|
||||
max_size = 0;
|
||||
type = avio_r8(pb);
|
||||
if (type == VOC_TYPE_EOF)
|
||||
return AVERROR_EOF;
|
||||
|
Loading…
Reference in New Issue
Block a user