From a63879049da2ae0c43b7a25b12192a37346801ff Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 16 Feb 2022 16:45:33 +0100 Subject: [PATCH] avfilter/af_superequalizer: check allocations return value --- libavfilter/af_superequalizer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/af_superequalizer.c b/libavfilter/af_superequalizer.c index aa73e92039..2b032b0846 100644 --- a/libavfilter/af_superequalizer.c +++ b/libavfilter/af_superequalizer.c @@ -148,6 +148,8 @@ static int equ_init(SuperEqualizerContext *s, int wb) s->ires = av_calloc(s->tabsize, sizeof(float)); s->irest = av_calloc(s->tabsize, sizeof(float)); s->fsamples = av_calloc(s->tabsize, sizeof(float)); + if (!s->ires || !s->irest || !s->fsamples) + return AVERROR(ENOMEM); for (i = 0; i <= M; i++) { s->fact[i] = 1;