avformat/dcstr: Check sample rate
Fixes: signed integer overflow: -1300248894420254720 * 16 cannot be represented in type 'long'
Fixes: 30879/clusterfuzz-testcase-minimized-ffmpeg_dem_DCSTR_fuzzer-5094464215449600
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 fdcb966f4a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b14418c0cb
commit
f48e4903fb
1 changed files with 2 additions and 0 deletions
|
|
@ -43,6 +43,8 @@ static int dcstr_read_header(AVFormatContext *s)
|
|||
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
st->codecpar->channels = avio_rl32(s->pb);
|
||||
st->codecpar->sample_rate = avio_rl32(s->pb);
|
||||
if (st->codecpar->sample_rate <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
codec = avio_rl32(s->pb);
|
||||
align = avio_rl32(s->pb);
|
||||
avio_skip(s->pb, 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue