diff options
| author | Paul Eggert | 2011-10-24 16:06:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-10-24 16:06:11 -0700 |
| commit | 0fd11aa5e26da5ee2b36996f1a2376fb2d7ec6cc (patch) | |
| tree | 4095f7429b821e47990a457bcaaa7acc2e2446da /src | |
| parent | ee7804014888b29a0f75330ab305419a647925bb (diff) | |
| download | emacs-0fd11aa5e26da5ee2b36996f1a2376fb2d7ec6cc.tar.gz emacs-0fd11aa5e26da5ee2b36996f1a2376fb2d7ec6cc.zip | |
*print.c (Fexternal_debugging_output): Use more-conservative overflow fix.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/print.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c288ed6a2ed..5b41db9831a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -554,8 +554,7 @@ | |||
| 554 | Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts. | 554 | Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts. |
| 555 | (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough. | 555 | (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough. |
| 556 | (printchar, strout): Use xpalloc to catch size calculation overflow. | 556 | (printchar, strout): Use xpalloc to catch size calculation overflow. |
| 557 | (Fexternal_debugging_output): Use CHECK_CHARACTER, not CHECK_NUMBER, | 557 | (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion. |
| 558 | to avoid mishandling large integers. | ||
| 559 | (print_error_message): Use SAFE_ALLOCA, not alloca. | 558 | (print_error_message): Use SAFE_ALLOCA, not alloca. |
| 560 | (print_object): Use int, not EMACS_INT, where int is wide enough. | 559 | (print_object): Use int, not EMACS_INT, where int is wide enough. |
| 561 | * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT. | 560 | * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT. |
diff --git a/src/print.c b/src/print.c index 63ef3e6279e..f3302daaea3 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -716,8 +716,8 @@ You can call print while debugging emacs, and pass it this function | |||
| 716 | to make it write to the debugging output. */) | 716 | to make it write to the debugging output. */) |
| 717 | (Lisp_Object character) | 717 | (Lisp_Object character) |
| 718 | { | 718 | { |
| 719 | CHECK_CHARACTER (character); | 719 | CHECK_NUMBER (character); |
| 720 | putc ((int) XINT (character), stderr); | 720 | putc (XINT (character) & 0xFF, stderr); |
| 721 | 721 | ||
| 722 | #ifdef WINDOWSNT | 722 | #ifdef WINDOWSNT |
| 723 | /* Send the output to a debugger (nothing happens if there isn't one). */ | 723 | /* Send the output to a debugger (nothing happens if there isn't one). */ |