From 2c4862e7a1315fb42eae7ebe574d41f53a1b009c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 23 Apr 2014 21:13:53 +0200 Subject: [PATCH] avfilter/avcodec: Use av_mallocz_array() Signed-off-by: Michael Niedermayer --- libavfilter/avcodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c index 605e5d24d8..ba11a25492 100644 --- a/libavfilter/avcodec.c +++ b/libavfilter/avcodec.c @@ -116,7 +116,7 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) planes = av_sample_fmt_is_planar(src->format) ? nb_channels : 1; if (planes > FF_ARRAY_ELEMS(dst->data)) { - dst->extended_data = av_mallocz(planes * sizeof(*dst->extended_data)); + dst->extended_data = av_mallocz_array(planes, sizeof(*dst->extended_data)); if (!dst->extended_data) return AVERROR(ENOMEM); memcpy(dst->extended_data, src->extended_data,