[FFmpeg-cvslog] avcodec/sunrast: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Wed Jan 14 13:53:28 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 14 13:35:11 2015 +0100| [c4f1abecb15e8d82ee1f6b776bc3bbfe94bb19d8] | committer: Michael Niedermayer

avcodec/sunrast: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index d9918f4..3fbec1d 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -127,7 +127,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
     buf += maplength;
 
     if (maplength && depth < 8) {
-        ptr = ptr2 = av_malloc((w + 15) * h);
+        ptr = ptr2 = av_malloc_array((w + 15), h);
         if (!ptr)
             return AVERROR(ENOMEM);
         stride = (w + 15 >> 3) * depth;



More information about the ffmpeg-cvslog mailing list