unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 899531e40ee0a74cc661a952f1492d6711e3aa20 1205 bytes (raw)
name: gnu/packages/patches/vboot-utils-fix-format-load-address.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
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;

debug log:

solving 899531e40 ...
found 899531e40 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).