Commit e481ba2e authored by Michael Niedermayer's avatar Michael Niedermayer

vqf: check samplerate, avoid division by 0.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fb6a72cd
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment