[FFmpeg-cvslog] avcodec/vble: use av_malloc_array()

Michael Niedermayer git at videolan.org
Wed Apr 16 19:52:35 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 16 19:45:43 2014 +0200| [58a53123bae90798155bd11a0db680b334abf4e4] | committer: Michael Niedermayer

avcodec/vble: use av_malloc_array()

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

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

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

diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index a8c71ed..ed08b83 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -189,7 +189,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx)
     ctx->size = avpicture_get_size(avctx->pix_fmt,
                                    avctx->width, avctx->height);
 
-    ctx->val = av_malloc(ctx->size * sizeof(*ctx->val));
+    ctx->val = av_malloc_array(ctx->size, sizeof(*ctx->val));
 
     if (!ctx->val) {
         av_log(avctx, AV_LOG_ERROR, "Could not allocate values buffer.\n");



More information about the ffmpeg-cvslog mailing list