Package: sox / 14.4.1-5+deb9u2

0005-fix-possible-null-pointer-deref-in-lsx_make_lpf-CVE-.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 2ce02fea7b350de9ddfbcf542ba4dd59a8ab255b Mon Sep 17 00:00:00 2001
From: Mans Rullgard <mans@mansr.com>
Date: Wed, 24 Apr 2019 15:08:51 +0100
Subject: [PATCH 5/5] fix possible null pointer deref in lsx_make_lpf()
 (CVE-2019-8357)

If the buffer allocation fails, return NULL.
---
 src/effects_i_dsp.c | 3 +++
 1 file changed, 3 insertions(+)

--- a/src/effects_i_dsp.c
+++ b/src/effects_i_dsp.c
@@ -260,6 +260,10 @@
   double mult = scale / lsx_bessel_I_0(beta);
   assert(Fc >= 0 && Fc <= 1);
   lsx_debug("make_lpf(n=%i, Fc=%g beta=%g dc-norm=%i scale=%g)", num_taps, Fc, beta, dc_norm, scale);
+
+  if (!h)
+    return NULL;
+
   for (i = 0; i <= m / 2; ++i) {
     double x = M_PI * (i - .5 * m), y = 2. * i / m - 1;
     h[i] = x? sin(Fc * x) / x : Fc;