aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pcx.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-10 17:19:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-10 17:32:05 +0100
commitd24de4596c3f980c9cc1cb5c8706c8411e46275b (patch)
tree9336ff039d98940188d44cc6f7a474e1554f177a /libavcodec/pcx.c
parentf41329c8aec0582737755589e81bcdc37613a609 (diff)
downloadandroid_external_ffmpeg-d24de4596c3f980c9cc1cb5c8706c8411e46275b.tar.gz
android_external_ffmpeg-d24de4596c3f980c9cc1cb5c8706c8411e46275b.tar.bz2
android_external_ffmpeg-d24de4596c3f980c9cc1cb5c8706c8411e46275b.zip
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>
Diffstat (limited to 'libavcodec/pcx.c')
-rw-r--r--libavcodec/pcx.c2
1 files changed, 1 insertions, 1 deletions
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);