diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-12 22:55:57 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-12 22:55:57 -0700 |
commit | ee2079f16e33b20dc2330062c766eafee4db240d (patch) | |
tree | 9e47ad79f2498f1205b410774f9171e0aeff4982 /src/unexelf.c | |
parent | 6da655361cb06353fd844e968a450d4e4b15f569 (diff) |
* unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
Diffstat (limited to 'src/unexelf.c')
-rw-r--r-- | src/unexelf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unexelf.c b/src/unexelf.c index 8b45894f85..951e7c0eea 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -391,6 +391,7 @@ temacs: extern void fatal (const char *msgid, ...); #include <sys/types.h> +#include <stdint.h> #include <stdio.h> #include <sys/stat.h> #include <memory.h> @@ -784,7 +785,7 @@ unexec (const char *new_name, const char *old_name) fprintf (stderr, "new_data2_incr %x\n", new_data2_incr); #endif - if ((unsigned) new_bss_addr < (unsigned) old_bss_addr + old_bss_size) + if ((uintptr_t) new_bss_addr < (uintptr_t) old_bss_addr + old_bss_size) fatal (".bss shrank when undumping???\n", 0, 0); /* Set the output file to the right size. Allocate a buffer to hold |