From bcfd9f8d7fc16ae58ead975acfd2f0b748388111 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 11 Jan 2015 13:42:06 +0100 Subject: [PATCH] avcodec/proresdec_lgpl: Use av_malloc_array() Signed-off-by: Michael Niedermayer --- libavcodec/proresdec_lgpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c index f2e24ec786..a2ee419988 100644 --- a/libavcodec/proresdec_lgpl.c +++ b/libavcodec/proresdec_lgpl.c @@ -263,7 +263,7 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf, if (ctx->total_slices != num_slices) { av_freep(&ctx->slice_data); - ctx->slice_data = av_malloc((num_slices + 1) * sizeof(ctx->slice_data[0])); + ctx->slice_data = av_malloc_array(num_slices + 1, sizeof(ctx->slice_data[0])); if (!ctx->slice_data) return AVERROR(ENOMEM); ctx->total_slices = num_slices;