diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c index d21639e154..e7f9c240f6 100644 --- a/libavcodec/pcx.c +++ b/libavcodec/pcx.c @@ -161,7 +161,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ptr = p->data[0]; stride = p->linesize[0]; - scanline = av_malloc(bytes_per_scanline); + scanline = av_malloc(bytes_per_scanline + FF_INPUT_BUFFER_PADDING_SIZE); if (!scanline) return AVERROR(ENOMEM);