summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-12 22:55:57 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-12 22:55:57 -0700
commitee2079f16e33b20dc2330062c766eafee4db240d (patch)
tree9e47ad79f2498f1205b410774f9171e0aeff4982 /src
parent6da655361cb06353fd844e968a450d4e4b15f569 (diff)
downloademacs-ee2079f16e33b20dc2330062c766eafee4db240d.tar.gz
* unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/unexelf.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8e74e4a630e..9c7cf3cba9a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
2011-06-13 Paul Eggert <eggert@cs.ucla.edu>
+ * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
+
* xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
* keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
diff --git a/src/unexelf.c b/src/unexelf.c
index 8b45894f853..951e7c0eea6 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