mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/cafdec: Check channels
Fixes: signed integer overflow: -1184429040541376544 * 32 cannot be represented in type 'long' Fixes: 31788/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6236746338664448 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
54d8386f52
commit
641c1db22b
@ -79,7 +79,7 @@ static int read_desc_chunk(AVFormatContext *s)
|
||||
st->codecpar->channels = avio_rb32(pb);
|
||||
st->codecpar->bits_per_coded_sample = avio_rb32(pb);
|
||||
|
||||
if (caf->bytes_per_packet < 0 || caf->frames_per_packet < 0)
|
||||
if (caf->bytes_per_packet < 0 || caf->frames_per_packet < 0 || st->codecpar->channels < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
/* calculate bit rate for constant size packets */
|
||||
|
Loading…
Reference in New Issue
Block a user