avcodec/proresdec2: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 22 May 2014 13:05:27 +0000 (15:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 22 May 2014 13:05:27 +0000 (15:05 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/proresdec2.c

index b1affad..add9908 100644 (file)
@@ -182,7 +182,7 @@ static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, cons
 
     if (ctx->slice_count != slice_count || !ctx->slices) {
         av_freep(&ctx->slices);
-        ctx->slices = av_mallocz(slice_count * sizeof(*ctx->slices));
+        ctx->slices = av_mallocz_array(slice_count, sizeof(*ctx->slices));
         if (!ctx->slices)
             return AVERROR(ENOMEM);
         ctx->slice_count = slice_count;