summaryrefslogtreecommitdiffstats
path: root/abs/core/libsndfile/lossy_comp_test-overflow.dpatch
blob: bf5c82905169cc4ee9ea3cc2aecaf683b96a28d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh /usr/share/dpatch/dpatch-run
## lossy_comp_test-overflow.dpatch by Martin Michlmayr <tbm@cyrius.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Avoid a possible overflow in sum_abs.
## DP: See #362414.

@DPATCH@
diff -urNad libsndfile-1.0.17~/tests/lossy_comp_test.c libsndfile-1.0.17/tests/lossy_comp_test.c
--- libsndfile-1.0.17~/tests/lossy_comp_test.c	2006-08-31 11:22:07.000000000 +0200
+++ libsndfile-1.0.17/tests/lossy_comp_test.c	2007-04-07 10:33:05.000000000 +0200
@@ -691,7 +691,8 @@
 lcomp_test_int (const char *filename, int filetype, int channels, double margin)
 {	SNDFILE		*file ;
 	SF_INFO		sfinfo ;
-	int			k, m, *orig, *data, sum_abs ;
+	int		k, m, *orig, *data ;
+	long long	sum_abs ;
 	long		datalen, seekpos ;
 	double		scale ;