mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
xxan: more complete ybuf checks, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
196920060b
commit
77693c541a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user