mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-23 15:26:57 +00:00
avformat/aiffdec: Check size before subtraction in get_aiff_header()
Fixes: Infinite loop
Fixes: 27235/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5761398380167168
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 8af299acde
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6ed98dfd14
commit
502ca11d69
@ -119,6 +119,8 @@ static int get_aiff_header(AVFormatContext *s, int size,
|
||||
else
|
||||
sample_rate = (val + (1ULL<<(-exp-1))) >> -exp;
|
||||
par->sample_rate = sample_rate;
|
||||
if (size < 18)
|
||||
return AVERROR_INVALIDDATA;
|
||||
size -= 18;
|
||||
|
||||
/* get codec id for AIFF-C */
|
||||
|
Loading…
Reference in New Issue
Block a user