diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index d535c38dd9..b66acd4220 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -461,6 +461,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;