mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
pcx: Add missing padding to scanline buffer
Fixes out of array read Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f41329c8ae
commit
d24de4596c
@ -161,7 +161,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
ptr = p->data[0];
|
ptr = p->data[0];
|
||||||
stride = p->linesize[0];
|
stride = p->linesize[0];
|
||||||
|
|
||||||
scanline = av_malloc(bytes_per_scanline);
|
scanline = av_malloc(bytes_per_scanline + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!scanline)
|
if (!scanline)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user