summary refs log tree commit diff
path: root/gnu/packages/patches/vboot-utils-fix-format-load-address.patch
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-01-09 10:48:42 +0200
committerEfraim Flashner <efraim@flashner.co.il>2019-01-09 10:52:41 +0200
commit0e289672503a4e1599ef826d49f2fa5575081942 (patch)
treecdaec28207956090b7cebff805135754dcb22f06 /gnu/packages/patches/vboot-utils-fix-format-load-address.patch
parent0109b89c5834b5374f248dc3681702180013f41f (diff)
parent6df4d8338d2bf94ab729e3b12e42ace0a06687ae (diff)
downloadguix-0e289672503a4e1599ef826d49f2fa5575081942.tar.gz
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'gnu/packages/patches/vboot-utils-fix-format-load-address.patch')
-rw-r--r--gnu/packages/patches/vboot-utils-fix-format-load-address.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/patches/vboot-utils-fix-format-load-address.patch b/gnu/packages/patches/vboot-utils-fix-format-load-address.patch
new file mode 100644
index 0000000000..899531e40e
--- /dev/null
+++ b/gnu/packages/patches/vboot-utils-fix-format-load-address.patch
@@ -0,0 +1,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;