svq1dec: call avcodec_set_dimensions() after dimensions changed.

Fixes NGS00148, CVE-2011-4579

Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-18 19:10:21 +01:00 committed by Reinhard Tartler
parent be00d2e174
commit 6e24b9488e
1 changed files with 1 additions and 0 deletions

View File

@ -659,6 +659,7 @@ static int svq1_decode_frame(AVCodecContext *avctx,
av_dlog(s->avctx, "Error in svq1_decode_frame_header %i\n",result); av_dlog(s->avctx, "Error in svq1_decode_frame_header %i\n",result);
return result; return result;
} }
avcodec_set_dimensions(avctx, s->width, s->height);
//FIXME this avoids some confusion for "B frames" without 2 references //FIXME this avoids some confusion for "B frames" without 2 references
//this should be removed after libavcodec can handle more flexible picture types & ordering //this should be removed after libavcodec can handle more flexible picture types & ordering