diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2020-03-22 10:34:42 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2020-03-22 10:34:42 +0000 |
commit | 7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23 (patch) | |
tree | 7cb10f6bfae6c18be3f8b837840bdc060505fe65 /user/sox/CVE-2019-8354.patch | |
parent | 8e8bfad331752ef7dc605c9f7c65e8271f96ddeb (diff) | |
parent | 988d22dd710713d46c13c0b08f045aa2ce4f69d9 (diff) | |
download | packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.tar.gz packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.tar.bz2 packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.tar.xz packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.zip |
Merge branch 'cves.2020.03.16' into 'master'
CVE patches for 2020.03.16
See merge request adelie/packages!411
Diffstat (limited to 'user/sox/CVE-2019-8354.patch')
-rw-r--r-- | user/sox/CVE-2019-8354.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/user/sox/CVE-2019-8354.patch b/user/sox/CVE-2019-8354.patch new file mode 100644 index 000000000..1fa0e669f --- /dev/null +++ b/user/sox/CVE-2019-8354.patch @@ -0,0 +1,28 @@ +From f70911261a84333b077c29908e1242f69d7439eb Mon Sep 17 00:00:00 2001 +From: Mans Rullgard <mans@mansr.com> +Date: Wed, 24 Apr 2019 14:57:34 +0100 +Subject: [PATCH] fix possible buffer size overflow in lsx_make_lpf() + (CVE-2019-8354) + +The multiplication in the size argument malloc() might overflow, +resulting in a small buffer being allocated. Use calloc() instead. +--- + src/effects_i_dsp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/effects_i_dsp.c b/src/effects_i_dsp.c +index a979b501..e32dfa05 100644 +--- a/src/effects_i_dsp.c ++++ b/src/effects_i_dsp.c +@@ -357,7 +357,7 @@ double * lsx_make_lpf(int num_taps, double Fc, double beta, double rho, + double scale, sox_bool dc_norm) + { + int i, m = num_taps - 1; +- double * h = malloc(num_taps * sizeof(*h)), sum = 0; ++ double * h = calloc(num_taps, sizeof(*h)), sum = 0; + double mult = scale / lsx_bessel_I_0(beta), mult1 = 1 / (.5 * m + rho); + 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); +-- +2.25.0 + |