mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/aiffdec: Check that SSND is at least 8 bytes
Fixes: Infinite loop
Fixes: 30874/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5933710488764416
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 460d3dc41f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f48e4903fb
commit
584afd3678
|
@ -284,6 +284,8 @@ static int aiff_read_header(AVFormatContext *s)
|
||||||
get_meta(s, "comment" , size);
|
get_meta(s, "comment" , size);
|
||||||
break;
|
break;
|
||||||
case MKTAG('S', 'S', 'N', 'D'): /* Sampled sound chunk */
|
case MKTAG('S', 'S', 'N', 'D'): /* Sampled sound chunk */
|
||||||
|
if (size < 8)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
aiff->data_end = avio_tell(pb) + size;
|
aiff->data_end = avio_tell(pb) + size;
|
||||||
offset = avio_rb32(pb); /* Offset of sound data */
|
offset = avio_rb32(pb); /* Offset of sound data */
|
||||||
avio_rb32(pb); /* BlockSize... don't care */
|
avio_rb32(pb); /* BlockSize... don't care */
|
||||||
|
|
Loading…
Reference in New Issue