aboutsummaryrefslogtreecommitdiff
This patch was copied from Debian.

Description: Fix format load_address for 32 bits architectures
 The offset and load_address are 64bits integers
 On 32bits we have to use strtoull (instead of strtoul) to parse number
 into 64bits unsigned integers. Without this the parsed numbers are
 truncated to 2^32-1.
Author: Sophie Brun <sophie@freexian.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881997
Forwarded: https://bugs.chromium.org/p/chromium/issues/detail?id=786969
Last-Update: 2017-11-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/futility/cmd_bdb.c
+++ b/futility/cmd_bdb.c
@@ -637,7 +637,7 @@ static int do_bdb(int argc, char *argv[]
 			}
 			break;
 		case OPT_OFFSET:
-			offset = strtoul(optarg, &e, 0);
+			offset = strtoull(optarg, &e, 0);
 			if (!*optarg || (e && *e)) {
 				fprintf(stderr, "Invalid --offset\n");
 				parse_error = 1;
@@ -658,7 +658,7 @@ static int do_bdb(int argc, char *argv[]
 			}
 			break;
 		case OPT_LOAD_ADDRESS:
-			load_address = strtoul(optarg, &e, 0);
+			load_address = strtoull(optarg, &e, 0);
 			if (!*optarg || (e && *e)) {
 				fprintf(stderr, "Invalid --load_address\n");
 				parse_error = 1;
x lint`: CVE-2015-7747; CVE-2017-6827, CVE-2017-6828, CVE-2017-6829, CVE-2017-6830, CVE-2017-6831, CVE-2017-6832, CVE-2017-6833, CVE-2017-6834, CVE-2017-6835, CVE-2017-6836, CVE-2017-6837, CVE-2017-6838, CVE-2017-6839; CVE-2018-13440; CVE-2018-17095 Since the patches do not reference to CVEs, it's a bit hard to tell which patch actually closes which CVE. Debian reports all these to be closed by the patches below and NixPkgs provides references. * gnu/packages/audio.scm (audiofile): New variable. * gnu/packages/patches/audiofile-fix-datatypes-in-tests.patch, gnu/packages/patches/audiofile-fix-sign-conversion.patch, gnu/packages/patches/audiofile-CVE-2015-7747.patch, gnu/packages/patches/audiofile-CVE-2018-13440.patch, gnu/packages/patches/audiofile-CVE-2018-17095.patch, gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch, gnu/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch, gnu/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch, gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch, gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch, gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch, gnu/packages/patches/audiofile-hurd.patch, gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch: New files. * gnu/local.mk: Add them. Hartmut Goebel