diff options
| author | Paul Eggert | 2011-06-12 22:55:57 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-12 22:55:57 -0700 |
| commit | ee2079f16e33b20dc2330062c766eafee4db240d (patch) | |
| tree | 9e47ad79f2498f1205b410774f9171e0aeff4982 | |
| parent | 6da655361cb06353fd844e968a450d4e4b15f569 (diff) | |
| download | emacs-ee2079f16e33b20dc2330062c766eafee4db240d.tar.gz emacs-ee2079f16e33b20dc2330062c766eafee4db240d.zip | |
* unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/unexelf.c | 3 |
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 @@ | |||
| 1 | 2011-06-13 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * unexelf.c (unexec): Don't assume BSS addr fits in unsigned. | ||
| 4 | |||
| 3 | * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned. | 5 | * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned. |
| 4 | 6 | ||
| 5 | * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX. | 7 | * 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: | |||
| 391 | extern void fatal (const char *msgid, ...); | 391 | extern void fatal (const char *msgid, ...); |
| 392 | 392 | ||
| 393 | #include <sys/types.h> | 393 | #include <sys/types.h> |
| 394 | #include <stdint.h> | ||
| 394 | #include <stdio.h> | 395 | #include <stdio.h> |
| 395 | #include <sys/stat.h> | 396 | #include <sys/stat.h> |
| 396 | #include <memory.h> | 397 | #include <memory.h> |
| @@ -784,7 +785,7 @@ unexec (const char *new_name, const char *old_name) | |||
| 784 | fprintf (stderr, "new_data2_incr %x\n", new_data2_incr); | 785 | fprintf (stderr, "new_data2_incr %x\n", new_data2_incr); |
| 785 | #endif | 786 | #endif |
| 786 | 787 | ||
| 787 | if ((unsigned) new_bss_addr < (unsigned) old_bss_addr + old_bss_size) | 788 | if ((uintptr_t) new_bss_addr < (uintptr_t) old_bss_addr + old_bss_size) |
| 788 | fatal (".bss shrank when undumping???\n", 0, 0); | 789 | fatal (".bss shrank when undumping???\n", 0, 0); |
| 789 | 790 | ||
| 790 | /* Set the output file to the right size. Allocate a buffer to hold | 791 | /* Set the output file to the right size. Allocate a buffer to hold |