Browse Source

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>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
7c0748c2db
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/eatqi.c

+ 2
- 1
libavcodec/eatqi.c View File

@@ -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;


Loading…
Cancel
Save