aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-23 00:27:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-23 00:50:43 +0100
commit7c0748c2db015cf2bf2c4a32a43bd1d2697afc1e (patch)
tree8b119b81cd0268fb0af15fa1ed004dce23870f5e
parent5a4af049b1a84ee09aba3745678797fce82c4a1e (diff)
downloadffmpeg-7c0748c2db015cf2bf2c4a32a43bd1d2697afc1e.tar.gz
eatqi: replace break by goto.
This fixes some heap overread. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/eatqi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 5b7ff39e4a..337fa8ea1b 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -139,9 +139,10 @@ static int tqi_decode_frame(AVCodecContext *avctx,
for (s->mb_x=0; s->mb_x<(avctx->width+15)/16; s->mb_x++)
{
if(tqi_decode_mb(s, t->block) < 0)
- break;
+ goto end;
tqi_idct_put(t, t->block);
}
+ end:
*data_size = sizeof(AVFrame);
*(AVFrame*)data = t->frame;