Commit a63a86fd authored by Oana Stratulat's avatar Oana Stratulat Committed by Michael Niedermayer

Fixes issue 890: OOM with zmbv file

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 44e19145
......@@ -544,6 +544,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->start_time = 0;
avio_rl32(pb); /* buffer size */
avio_rl32(pb); /* quality */
if (ast->cum_len*ast->scale/ast->rate > 3600) {
av_log(s, AV_LOG_ERROR, "crazy start time, iam scared, giving up\n");
return AVERROR_INVALIDDATA;
}
ast->sample_size = avio_rl32(pb); /* sample ssize */
ast->cum_len *= FFMAX(1, ast->sample_size);
// av_log(s, AV_LOG_DEBUG, "%d %d %d %d\n", ast->rate, ast->scale, ast->start, ast->sample_size);
......
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