xxan: check ybuf index before use.

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/8/head
Michael Niedermayer 12 years ago
parent 774830050a
commit 8ad9b48c9b
  1. 1
      libavcodec/xxan.c

@ -289,6 +289,7 @@ static int xan_decode_frame_type0(AVCodecContext *avctx)
ybuf[j+1] = cur << 1;
last = cur;
}
if(j < avctx->width)
ybuf[j] = last << 1;
prev_buf = ybuf;
ybuf += avctx->width;

Loading…
Cancel
Save