diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-03-03 22:54:33 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-03-03 23:07:10 +0100 |
commit | 99f7f4144aa644b0d26dae6efe9ac81ba252cb1a (patch) | |
tree | 9435f96018885c954f64b486b2bfc40482a465ec /libavfilter/asrc_sinc.c | |
parent | f4d123341c564e33d0410c41a05e9782d4df7585 (diff) | |
download | ffmpeg-99f7f4144aa644b0d26dae6efe9ac81ba252cb1a.tar.gz |
avfilter/asrc_sinc: check allocation return value
Diffstat (limited to 'libavfilter/asrc_sinc.c')
-rw-r--r-- | libavfilter/asrc_sinc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index e64a1e2f1c..1218696b27 100644 --- a/libavfilter/asrc_sinc.c +++ b/libavfilter/asrc_sinc.c @@ -113,6 +113,9 @@ static float *make_lpf(int num_taps, float Fc, float beta, float rho, float *h = av_calloc(num_taps, sizeof(*h)), sum = 0; float mult = scale / bessel_I_0(beta), mult1 = 1.f / (.5f * m + rho); + if (!h) + return NULL; + av_assert0(Fc >= 0 && Fc <= 1); for (i = 0; i <= m / 2; i++) { |