diff options
| author | Ken Raeburn | 2005-12-06 07:40:47 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2005-12-06 07:40:47 +0000 |
| commit | 88fde92a48ab3e79ee91e0db62f775c28c77fa95 (patch) | |
| tree | 7ac93e37f60d49d041cebce55b033808e0ac20c4 | |
| parent | 7723a3e52b00e7db534d576b5e3701a9defe63c4 (diff) | |
| download | emacs-88fde92a48ab3e79ee91e0db62f775c28c77fa95.tar.gz emacs-88fde92a48ab3e79ee91e0db62f775c28c77fa95.zip | |
(truncate_undo_list): Avoid dangerous side effects in NILP argument.
| -rw-r--r-- | src/ChangeLog | 14 | ||||
| -rw-r--r-- | src/undo.c | 6 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ee919e534bd..f66cf95d9d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2005-12-06 Ken Raeburn <raeburn@gnu.org> | ||
| 2 | |||
| 3 | * buffer.c (Fkill_buffer): Avoid dangerous side effects in NILP | ||
| 4 | argument. | ||
| 5 | * bytecode.c (Fbyte_code): Likewise. | ||
| 6 | * fileio.c (internal_delete_file, Fread_file_name_internal): | ||
| 7 | Likewise. | ||
| 8 | * minibuf.c (Fminibuffer_complete_and_exit): Likewise. | ||
| 9 | * undo.c (truncate_undo_list): Likewise. | ||
| 10 | |||
| 1 | 2005-12-05 Richard M. Stallman <rms@gnu.org> | 11 | 2005-12-05 Richard M. Stallman <rms@gnu.org> |
| 2 | 12 | ||
| 3 | * window.c (enlarge_window): Eliminate arg preserve_before. | 13 | * window.c (enlarge_window): Eliminate arg preserve_before. |
| @@ -97,7 +107,7 @@ | |||
| 97 | * macterm.h (cfstring_to_lisp_nodecode) [TARGET_API_MAC_CARBON]: | 107 | * macterm.h (cfstring_to_lisp_nodecode) [TARGET_API_MAC_CARBON]: |
| 98 | Add prototype. | 108 | Add prototype. |
| 99 | 109 | ||
| 100 | 2005-11-21 Ken Raeburn <raeburn@mit.edu> | 110 | 2005-11-21 Ken Raeburn <raeburn@gnu.org> |
| 101 | 111 | ||
| 102 | * keymap.c (shadow_lookup): Use make_number to pass a number to | 112 | * keymap.c (shadow_lookup): Use make_number to pass a number to |
| 103 | Fsubstring. | 113 | Fsubstring. |
| @@ -16331,7 +16341,7 @@ | |||
| 16331 | * xdisp.c (forward_to_next_line_start): Return 0 when reaching the | 16341 | * xdisp.c (forward_to_next_line_start): Return 0 when reaching the |
| 16332 | end of the buffer. | 16342 | end of the buffer. |
| 16333 | 16343 | ||
| 16334 | 2002-08-08 Ken Raeburn <raeburn@mit.edu> | 16344 | 2002-08-08 Ken Raeburn <raeburn@gnu.org> |
| 16335 | 16345 | ||
| 16336 | * coding.c (Ffind_operation_coding_system): Fix Lisp_Object/int mixup. | 16346 | * coding.c (Ffind_operation_coding_system): Fix Lisp_Object/int mixup. |
| 16337 | 16347 | ||
diff --git a/src/undo.c b/src/undo.c index 9839906ca7e..ecbb714fddd 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -378,11 +378,11 @@ truncate_undo_list (b) | |||
| 378 | && size_so_far > XINT (Vundo_outer_limit) | 378 | && size_so_far > XINT (Vundo_outer_limit) |
| 379 | && !NILP (Vundo_outer_limit_function)) | 379 | && !NILP (Vundo_outer_limit_function)) |
| 380 | { | 380 | { |
| 381 | Lisp_Object temp = last_undo_buffer; | 381 | Lisp_Object temp = last_undo_buffer, tem; |
| 382 | 382 | ||
| 383 | /* Normally the function this calls is undo-outer-limit-truncate. */ | 383 | /* Normally the function this calls is undo-outer-limit-truncate. */ |
| 384 | if (! NILP (call1 (Vundo_outer_limit_function, | 384 | tem = call1 (Vundo_outer_limit_function, make_number (size_so_far)); |
| 385 | make_number (size_so_far)))) | 385 | if (! NILP (tem)) |
| 386 | { | 386 | { |
| 387 | /* The function is responsible for making | 387 | /* The function is responsible for making |
| 388 | any desired changes in buffer-undo-list. */ | 388 | any desired changes in buffer-undo-list. */ |