Commit 8ad9b48c authored by Michael Niedermayer's avatar Michael Niedermayer

xxan: check ybuf index before use.

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 77483005
......@@ -289,7 +289,8 @@ static int xan_decode_frame_type0(AVCodecContext *avctx)
ybuf[j+1] = cur << 1;
last = cur;
}
ybuf[j] = last << 1;
if(j < avctx->width)
ybuf[j] = last << 1;
prev_buf = ybuf;
ybuf += avctx->width;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment