mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
774830050a
commit
8ad9b48c9b
|
@ -289,7 +289,8 @@ static int xan_decode_frame_type0(AVCodecContext *avctx)
|
||||||
ybuf[j+1] = cur << 1;
|
ybuf[j+1] = cur << 1;
|
||||||
last = cur;
|
last = cur;
|
||||||
}
|
}
|
||||||
ybuf[j] = last << 1;
|
if(j < avctx->width)
|
||||||
|
ybuf[j] = last << 1;
|
||||||
prev_buf = ybuf;
|
prev_buf = ybuf;
|
||||||
ybuf += avctx->width;
|
ybuf += avctx->width;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue