summaryrefslogtreecommitdiff
path: root/community/lmms/lmms-1.0.2-build-fix.patch
blob: 7f003b54b557f7ff9771eee4e6d13450391bd56e (plain)
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 ab55b26e4b1521e5401f60a2f618f31579e9cc5c Mon Sep 17 00:00:00 2001
From: Tobias Doerffel <tobias.doerffel@gmail.com>
Date: Sat, 5 Jul 2014 17:46:10 +0200
Subject: [PATCH] SWH/BodeShifterCV: fix out-of-bounds array access

The xcoeffs array only has 100 elements and thus accessing xcoeffs[100]
leads to undefined behaviour.
---
 plugins/LadspaEffect/swh/bode_shifter_cv_1432.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c b/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c
index 41fb4f0..967edf6 100644
--- a/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c
+++ b/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c
@@ -247,7 +247,7 @@ static void runBodeShifterCV(LADSPA_Handle instance, unsigned long sample_count)
 	  /* Perform the Hilbert FIR convolution
 	   * (probably FFT would be faster) */
 	  hilb = 0.0f;
-	  for (i = 0; i <= NZEROS/2; i++) {
+	  for (i = 0; i < NZEROS/2; i++) {
 	    hilb += (xcoeffs[i] * delay[(dptr - i*2) & (D_SIZE - 1)]);
 	  }
 
-- 
1.9.3

From f91925f34aa1ee8ecacb12b8c4943c7e8aaabbfe Mon Sep 17 00:00:00 2001
From: Rafael Ruggiero <rafael46w@gmail.com>
Date: Tue, 15 Jul 2014 17:41:07 -0300
Subject: [PATCH] Update bode_shifter_cv_1432.c

---
 plugins/LadspaEffect/swh/bode_shifter_cv_1432.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c b/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c
index 967edf6..a9c764e 100644
--- a/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c
+++ b/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c
@@ -350,7 +350,7 @@ static void runAddingBodeShifterCV(LADSPA_Handle instance, unsigned long sample_
 	  /* Perform the Hilbert FIR convolution
 	   * (probably FFT would be faster) */
 	  hilb = 0.0f;
-	  for (i = 0; i <= NZEROS/2; i++) {
+	  for (i = 0; i < NZEROS/2; i++) {
 	    hilb += (xcoeffs[i] * delay[(dptr - i*2) & (D_SIZE - 1)]);
 	  }
 
-- 
1.9.3

From ad35c553b39fc70237605952bf2c6ff1fac5b7b7 Mon Sep 17 00:00:00 2001
From: Rafael Ruggiero <rafael46w@gmail.com>
Date: Tue, 15 Jul 2014 17:42:01 -0300
Subject: [PATCH] Update surround_encoder_1401.c

---
 plugins/LadspaEffect/swh/surround_encoder_1401.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/LadspaEffect/swh/surround_encoder_1401.c b/plugins/LadspaEffect/swh/surround_encoder_1401.c
index d4b6ace..100a03e 100644
--- a/plugins/LadspaEffect/swh/surround_encoder_1401.c
+++ b/plugins/LadspaEffect/swh/surround_encoder_1401.c
@@ -228,7 +228,7 @@ static void runSurroundEncoder(LADSPA_Handle instance, unsigned long sample_coun
 	for (pos = 0; pos < sample_count; pos++) {
 	  delay[dptr] = s[pos];
 	  hilb = 0.0f;
-	  for (i = 0; i <= NZEROS/2; i++) {
+	  for (i = 0; i < NZEROS/2; i++) {
 	    hilb += (xcoeffs[i] * delay[(dptr - i*2) & (D_SIZE - 1)]);
 	  }
 	  dptr = (dptr + 1) & (D_SIZE - 1);
@@ -296,7 +296,7 @@ static void runAddingSurroundEncoder(LADSPA_Handle instance, unsigned long sampl
 	for (pos = 0; pos < sample_count; pos++) {
 	  delay[dptr] = s[pos];
 	  hilb = 0.0f;
-	  for (i = 0; i <= NZEROS/2; i++) {
+	  for (i = 0; i < NZEROS/2; i++) {
 	    hilb += (xcoeffs[i] * delay[(dptr - i*2) & (D_SIZE - 1)]);
 	  }
 	  dptr = (dptr + 1) & (D_SIZE - 1);
-- 
1.9.3