Package: sox / 14.4.2+git20190427-5

0016-CVE-2019-8356.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
From: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Date: Sat, 11 Nov 2023 18:18:40 +0100
Subject: CVE-2019-8356

---
 src/fft4g.c | 18 ++++++++++++++++++
 src/fft4g.h |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/src/fft4g.c b/src/fft4g.c
index 38a8bcc..88a2a7e 100644
--- a/src/fft4g.c
+++ b/src/fft4g.c
@@ -322,6 +322,9 @@ static void rftfsub(int n, double *a, int nc, double const *c);
 
 void cdft(int n, int isgn, double *a, int *ip, double *w)
 {
+    if (n > FFT4G_MAX_SIZE)
+        return;
+
     if (n > (ip[0] << 2)) {
         makewt(n >> 2, ip, w);
     }
@@ -344,6 +347,9 @@ void rdft(int n, int isgn, double *a, int *ip, double *w)
     int nw, nc;
     double xi;
     
+    if (n > FFT4G_MAX_SIZE)
+        return;
+
     nw = ip[0];
     if (n > (nw << 2)) {
         nw = n >> 2;
@@ -384,6 +390,9 @@ void ddct(int n, int isgn, double *a, int *ip, double *w)
     int j, nw, nc;
     double xr;
     
+    if (n > FFT4G_MAX_SIZE)
+        return;
+
     nw = ip[0];
     if (n > (nw << 2)) {
         nw = n >> 2;
@@ -435,6 +444,9 @@ void ddst(int n, int isgn, double *a, int *ip, double *w)
     int j, nw, nc;
     double xr;
     
+    if (n > FFT4G_MAX_SIZE)
+        return;
+
     nw = ip[0];
     if (n > (nw << 2)) {
         nw = n >> 2;
@@ -486,6 +498,9 @@ void dfct(int n, double *a, double *t, int *ip, double *w)
     int j, k, l, m, mh, nw, nc;
     double xr, xi, yr, yi;
     
+    if (n > FFT4G_MAX_SIZE)
+        return;
+
     nw = ip[0];
     if (n > (nw << 3)) {
         nw = n >> 3;
@@ -576,6 +591,9 @@ void dfst(int n, double *a, double *t, int *ip, double *w)
     int j, k, l, m, mh, nw, nc;
     double xr, xi, yr, yi;
     
+    if (n > FFT4G_MAX_SIZE)
+        return;
+
     nw = ip[0];
     if (n > (nw << 3)) {
         nw = n >> 3;
diff --git a/src/fft4g.h b/src/fft4g.h
index 2b8051c..95ee341 100644
--- a/src/fft4g.h
+++ b/src/fft4g.h
@@ -13,6 +13,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#define FFT4G_MAX_SIZE 262144
+
 void lsx_cdft(int, int, double *, int *, double *);
 void lsx_rdft(int, int, double *, int *, double *);
 void lsx_ddct(int, int, double *, int *, double *);