summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-10-11 16:39:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-11 16:39:41 +0200
commit98b8bf12bcf5418ccbbe0c23933f5d1b25d94ddd (patch)
treec1537dc90269fe33bc387712a85b83a5c071d3d5 /libavcodec
parentc08b06c22579fa831dc547a16d2d39f0ab01f6d2 (diff)
avcodec/pngdec: Use av_malloc_array()
Suggested-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a998b1d4a3..4cfdc588a5 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -980,7 +980,7 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s,
return AVERROR_PATCHWELCOME;
}
- buffer = av_malloc(s->image_linesize * s->height);
+ buffer = av_malloc_array(s->image_linesize, s->height);
if (!buffer)
return AVERROR(ENOMEM);