mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
fb6a72cde5
commit
e481ba2ed7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue