summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>2005-12-06 07:40:47 +0000
committerKen Raeburn <raeburn@raeburn.org>2005-12-06 07:40:47 +0000
commit88fde92a48ab3e79ee91e0db62f775c28c77fa95 (patch)
tree7ac93e37f60d49d041cebce55b033808e0ac20c4
parent7723a3e52b00e7db534d576b5e3701a9defe63c4 (diff)
downloademacs-88fde92a48ab3e79ee91e0db62f775c28c77fa95.tar.gz
(truncate_undo_list): Avoid dangerous side effects in NILP argument.
-rw-r--r--src/ChangeLog14
-rw-r--r--src/undo.c6
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 @@
+2005-12-06 Ken Raeburn <raeburn@gnu.org>
+
+ * buffer.c (Fkill_buffer): Avoid dangerous side effects in NILP
+ argument.
+ * bytecode.c (Fbyte_code): Likewise.
+ * fileio.c (internal_delete_file, Fread_file_name_internal):
+ Likewise.
+ * minibuf.c (Fminibuffer_complete_and_exit): Likewise.
+ * undo.c (truncate_undo_list): Likewise.
+
2005-12-05 Richard M. Stallman <rms@gnu.org>
* window.c (enlarge_window): Eliminate arg preserve_before.
@@ -97,7 +107,7 @@
* macterm.h (cfstring_to_lisp_nodecode) [TARGET_API_MAC_CARBON]:
Add prototype.
-2005-11-21 Ken Raeburn <raeburn@mit.edu>
+2005-11-21 Ken Raeburn <raeburn@gnu.org>
* keymap.c (shadow_lookup): Use make_number to pass a number to
Fsubstring.
@@ -16331,7 +16341,7 @@
* xdisp.c (forward_to_next_line_start): Return 0 when reaching the
end of the buffer.
-2002-08-08 Ken Raeburn <raeburn@mit.edu>
+2002-08-08 Ken Raeburn <raeburn@gnu.org>
* coding.c (Ffind_operation_coding_system): Fix Lisp_Object/int mixup.
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)
&& size_so_far > XINT (Vundo_outer_limit)
&& !NILP (Vundo_outer_limit_function))
{
- Lisp_Object temp = last_undo_buffer;
+ Lisp_Object temp = last_undo_buffer, tem;
/* Normally the function this calls is undo-outer-limit-truncate. */
- if (! NILP (call1 (Vundo_outer_limit_function,
- make_number (size_so_far))))
+ tem = call1 (Vundo_outer_limit_function, make_number (size_so_far));
+ if (! NILP (tem))
{
/* The function is responsible for making
any desired changes in buffer-undo-list. */