mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
xl: Fix overreads
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
1c66862472
commit
00aad121d8
@ -68,6 +68,12 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
V = a->pic.data[2];
|
||||
|
||||
stride = avctx->width - 4;
|
||||
|
||||
if (buf_size < avctx->width * avctx->height) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
for (i = 0; i < avctx->height; i++) {
|
||||
/* lines are stored in reversed order */
|
||||
buf += stride;
|
||||
|
Loading…
Reference in New Issue
Block a user