sox/CVE-2019-8357.patch
starlet-dx a3b24a76f4 Fix CVE-2019-8354,CVE-2019-8355,CVE-2019-8356,CVE-2019-8357 and CVE-2019-13590
(cherry picked from commit 225d6927a5a1ea8b52d6d8d05fb75271b3db8180)
2025-01-06 14:56:37 +08:00

13 lines
377 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- 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;