qtrle: check for invalid line offset

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a4ed7c3fe9f99b89f86b65710d8855dc572f1a25)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Laurent Aimar 2011-10-08 23:01:33 +02:00 committed by Michael Niedermayer
parent 7ab0b6b7ed
commit 67c46b9b30

View File

@ -464,6 +464,8 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
stream_ptr += 4;
height = AV_RB16(&s->buf[stream_ptr]);
stream_ptr += 4;
if (height > s->avctx->height - start_line)
goto done;
} else {
start_line = 0;
height = s->avctx->height;