[FFmpeg-cvslog] avcdoec/webp: use av_malloc_array()

Michael Niedermayer git at videolan.org
Sun Apr 20 18:25:15 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 20 17:35:19 2014 +0200| [de9cd5884822375d492ff4dcc98e55317a66c196] | committer: Michael Niedermayer

avcdoec/webp: use av_malloc_array()

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

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

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

diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index 4dbdf78..19cb1fc 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -309,7 +309,7 @@ static int huff_reader_build_canonical(HuffReader *r, int *code_lengths,
     if (max_code_length == 0 || max_code_length > MAX_HUFFMAN_CODE_LENGTH)
         return AVERROR(EINVAL);
 
-    codes = av_malloc(alphabet_size * sizeof(*codes));
+    codes = av_malloc_array(alphabet_size, sizeof(*codes));
     if (!codes)
         return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list