[FFmpeg-cvslog] vcodec/bitstream: use av_malloc_array()

Michael Niedermayer git at videolan.org
Tue Apr 8 16:23:59 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  8 16:18:29 2014 +0200| [e20e854ca056867027d4374ef1931a97d866c499] | committer: Michael Niedermayer

vcodec/bitstream: use av_malloc_array()

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

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

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

diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index e907322..5cb8631 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -293,7 +293,7 @@ int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
         vlc->table_allocated = 0;
         vlc->table_size      = 0;
 
-        buf = av_malloc((nb_codes + 1) * sizeof(VLCcode));
+        buf = av_malloc_array((nb_codes + 1), sizeof(VLCcode));
         if (!buf)
             return AVERROR(ENOMEM);
     }



More information about the ffmpeg-cvslog mailing list