mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 11:39:49 +00:00
avformat/3dostr: Check sample_rate
Fixes: signed integer overflow: -1268324762623155200 * 8 cannot be represented in type 'long' Fixes: 30123/clusterfuzz-testcase-minimized-ffmpeg_dem_THREEDOSTR_fuzzer-6710765123928064 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>
This commit is contained in:
parent
d7cb8c51f0
commit
7e5034f97e
@ -103,7 +103,7 @@ static int threedostr_read_header(AVFormatContext *s)
|
||||
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
st->codecpar->sample_rate = avio_rb32(s->pb);
|
||||
st->codecpar->channels = avio_rb32(s->pb);
|
||||
if (st->codecpar->channels <= 0)
|
||||
if (st->codecpar->channels <= 0 || st->codecpar->sample_rate <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
codec = avio_rl32(s->pb);
|
||||
avio_skip(s->pb, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user