#! /bin/sh /usr/share/dpatch/dpatch-run ## lossy_comp_test-overflow.dpatch by Martin Michlmayr ## ## 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 ;