ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Sun 
Oct 11 16:39:41 2015 +0200| [98b8bf12bcf5418ccbbe0c23933f5d1b25d94ddd] | 
committer: Michael Niedermayer

avcodec/pngdec: Use av_malloc_array()

Suggested-by: ubitux
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98b8bf12bcf5418ccbbe0c23933f5d1b25d94ddd
---

 libavcodec/pngdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a998b1d..4cfdc58 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);
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to