mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/wavdec: Check for data_size overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
13d605e090
commit
f40ec70478
@ -429,6 +429,11 @@ break_loop:
|
||||
|
||||
avio_seek(pb, data_ofs, SEEK_SET);
|
||||
|
||||
if (data_size > (INT64_MAX>>3)) {
|
||||
av_log(s, AV_LOG_WARNING, "Data size %"PRId64" is too large\n", data_size);
|
||||
data_size = 0;
|
||||
}
|
||||
|
||||
if ( data_size > 0 && sample_count && st->codec->channels
|
||||
&& (data_size << 3) / sample_count / st->codec->channels > st->codec->bits_per_coded_sample) {
|
||||
av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count);
|
||||
|
Loading…
x
Reference in New Issue
Block a user