[FFmpeg-cvslog] avfilter/af_superequalizer: check allocations return value
Paul B Mahol
git at videolan.org
Wed Feb 16 18:27:51 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Feb 16 16:45:33 2022 +0100| [a63879049da2ae0c43b7a25b12192a37346801ff] | committer: Paul B Mahol
avfilter/af_superequalizer: check allocations return value
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a63879049da2ae0c43b7a25b12192a37346801ff
---
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;
More information about the ffmpeg-cvslog
mailing list