aboutsummaryrefslogtreecommitdiffstats
path: root/community/sox/CVE-2019-8357.patch
blob: 6f0bf72e5360d6f2ac79246606ea05109179ea22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/src/effects_i_dsp.c
+++ b/src/effects_i_dsp.c
@@ -362,6 +362,9 @@
   assert(Fc >= 0 && Fc <= 1);
   lsx_debug("make_lpf(n=%i Fc=%.7g β=%g ρ=%g dc-norm=%i scale=%g)", num_taps, Fc, beta, rho, dc_norm, scale);
 
+  if (!h)
+    return NULL;
+
   for (i = 0; i <= m / 2; ++i) {
     double z = i - .5 * m, x = z * M_PI, y = z * mult1;
     h[i] = x? sin(Fc * x) / x : Fc;