diff options
author | Nicolas Cornu | 2016-02-12 14:18:41 +0100 |
---|---|---|
committer | Nicolas Cornu | 2016-02-12 14:18:41 +0100 |
commit | da96b40456ac3ca93278565807f5b67b7981db38 (patch) | |
tree | a5d1902679f5adc38fce2be375bbf422bc904339 /0001-Fix-use-of-size.patch | |
parent | 7808caa7380a2e553e2da8da390700ff084a380a (diff) | |
download | aur-da96b40456ac3ca93278565807f5b67b7981db38.tar.gz |
Add a patch to fix runtime error
Diffstat (limited to '0001-Fix-use-of-size.patch')
-rw-r--r-- | 0001-Fix-use-of-size.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/0001-Fix-use-of-size.patch b/0001-Fix-use-of-size.patch new file mode 100644 index 000000000000..266dcb6d9d4f --- /dev/null +++ b/0001-Fix-use-of-size.patch @@ -0,0 +1,43 @@ +From 0d0113debe197f2e2364976bf0bc6f8af2d4e85e Mon Sep 17 00:00:00 2001 +From: Nicolas Cornu <ncornu@aldebaran.com> +Date: Wed, 29 Jul 2015 14:52:57 +0200 +Subject: [PATCH] Fix use of size + +--- + src/execve/enter.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/execve/enter.c b/src/execve/enter.c +index dfdbaae..108bfbc 100644 +--- a/src/execve/enter.c ++++ b/src/execve/enter.c +@@ -460,10 +460,10 @@ static int expand_runner(Tracee* tracee, char host_path[PATH_MAX], char user_pat + } + + extern unsigned char _binary_loader_exe_start; +-extern unsigned char _binary_loader_exe_size; ++extern unsigned char _binary_loader_exe_end; + + extern unsigned char WEAK _binary_loader_m32_exe_start; +-extern unsigned char WEAK _binary_loader_m32_exe_size; ++extern unsigned char WEAK _binary_loader_m32_exe_end; + + /** + * Extract the built-in loader. This function returns NULL if an +@@ -489,11 +489,11 @@ static char *extract_loader(const Tracee *tracee, bool wants_32bit_version) + + if (wants_32bit_version) { + start = (void *) &_binary_loader_m32_exe_start; +- size = (size_t) &_binary_loader_m32_exe_size; ++ size = (size_t)(&_binary_loader_m32_exe_end-&_binary_loader_m32_exe_start); + } + else { + start = (void *) &_binary_loader_exe_start; +- size = (size_t) &_binary_loader_exe_size; ++ size = (size_t) (&_binary_loader_exe_end-&_binary_loader_exe_start); + } + + status2 = write(fd, start, size); +-- +2.7.0 + |