summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);