From 27f1ee7f53adf665818d89ce468e7e10bce4c831 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 21 Jan 2021 12:28:13 +0100 Subject: [PATCH] avfilter/vf_fieldmatch: use av_malloc_array() --- libavfilter/vf_fieldmatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 57ecf73864..528f943172 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -951,8 +951,8 @@ static int config_input(AVFilterLink *inlink) fm->tpitchuv = FFALIGN(w >> 1, 16); fm->tbuffer = av_calloc((h/2 + 4) * fm->tpitchy, sizeof(*fm->tbuffer)); - fm->c_array = av_malloc((((w + fm->blockx/2)/fm->blockx)+1) * - (((h + fm->blocky/2)/fm->blocky)+1) * + fm->c_array = av_malloc_array((((w + fm->blockx/2)/fm->blockx)+1) * + (((h + fm->blocky/2)/fm->blocky)+1), 4 * sizeof(*fm->c_array)); if (!fm->tbuffer || !fm->c_array) return AVERROR(ENOMEM);