1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

vqf: check samplerate, avoid division by 0.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-09 18:04:54 +01:00
parent fb6a72cde5
commit e481ba2ed7

View File

@ -175,6 +175,10 @@ static int vqf_read_header(AVFormatContext *s)
break;
default:
st->codec->sample_rate = rate_flag*1000;
if (st->codec->sample_rate <= 0) {
av_log(s, AV_LOG_ERROR, "sample rate %d is invalid\n", st->codec->sample_rate);
return -1;
}
break;
}