File: 1001-buffer_overrun.patch

package info (click to toggle)
flake 0.11-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 368 kB
  • sloc: ansic: 3,590; sh: 797; makefile: 180
file content (18 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Pass max_order instead of max_order+1 to compute_lpc_coefs().
 This avoids a buffer overrun in the autoc[] array.
Origin: upstream, commit:263
---
 libflake/lpc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- flake.orig/libflake/lpc.c
+++ flake/libflake/lpc.c
@@ -232,7 +232,7 @@ lpc_calc_coefs(const int32_t *samples, i
     int i;
     int opt_order;
 
-    compute_autocorr(samples, blocksize, max_order+1, autoc);
+    compute_autocorr(samples, blocksize, max_order, autoc);
 
     opt_order = max_order;
     if(omethod == FLAKE_ORDER_METHOD_EST) {