mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-22 06:46:59 +00:00
avformat/aiffdec: Check for size overflow in header parsing
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6723467048255488
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 bae2e19777
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9410be6ddd
commit
99c8690870
@ -101,6 +101,9 @@ static int get_aiff_header(AVFormatContext *s, int size,
|
||||
int sample_rate;
|
||||
unsigned int num_frames;
|
||||
|
||||
if (size == INT_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (size & 1)
|
||||
size++;
|
||||
par->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
|
Loading…
Reference in New Issue
Block a user