Commit e0249537 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/wavdec: check smv_frames_per_jpeg

Values outside would not be possible due to limitations of jpeg itself

Fixes very long running loop
Fixes Ticket2977
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cd05c406
......@@ -369,6 +369,10 @@ static int wav_read_header(AVFormatContext *s)
avio_rl24(pb);
avio_rl24(pb);
wav->smv_frames_per_jpeg = avio_rl24(pb);
if (wav->smv_frames_per_jpeg > 65536) {
av_log(s, AV_LOG_ERROR, "too many frames per jpeg\n");
return AVERROR_INVALIDDATA;
}
AV_WL32(vst->codec->extradata, wav->smv_frames_per_jpeg);
wav->smv_cur_pt = 0;
goto break_loop;
......
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