avformat/xwma: sanity check bits_per_coded_sample
Fixes: signed integer overflow: 65312 * 524296 cannot be represented in type 'int'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_XWMA_fuzzer-6595971445555200
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 fe6ce28d11)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d74868664f
commit
283e077dc6
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ static int xwma_read_header(AVFormatContext *s)
|
|||
st->codecpar->channels);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (!st->codecpar->bits_per_coded_sample) {
|
||||
if (!st->codecpar->bits_per_coded_sample || st->codecpar->bits_per_coded_sample > 64) {
|
||||
av_log(s, AV_LOG_WARNING, "Invalid bits_per_coded_sample: %d\n",
|
||||
st->codecpar->bits_per_coded_sample);
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue