Commit 77693c54 authored by Michael Niedermayer's avatar Michael Niedermayer

xxan: more complete ybuf checks, fix out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 19692006
......@@ -276,7 +276,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;
......@@ -350,7 +351,8 @@ static int xan_decode_frame_type1(AVCodecContext *avctx)
ybuf[j+1] = cur;
last = cur;
}
ybuf[j] = last;
if(j < avctx->width)
ybuf[j] = last;
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