diff options
Diffstat (limited to 'abs/core/libsndfile/lossy_comp_test-overflow.dpatch')
-rw-r--r-- | abs/core/libsndfile/lossy_comp_test-overflow.dpatch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/abs/core/libsndfile/lossy_comp_test-overflow.dpatch b/abs/core/libsndfile/lossy_comp_test-overflow.dpatch new file mode 100644 index 0000000..bf5c829 --- /dev/null +++ b/abs/core/libsndfile/lossy_comp_test-overflow.dpatch @@ -0,0 +1,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 ; + |