# HG changeset patch # User Ken Raeburn # Date 1133854777 0 # Node ID 2fdf240a514dcddeedf034e7f23e7c3e80083b2a # Parent 1eb416c4b16303e24c8eccc6d0d828c6ef6e48b6 (internal_delete_file, Fread_file_name_internal): Avoid dangerous side effects in NILP argument. diff -r 1eb416c4b163 -r 2fdf240a514d src/fileio.c --- a/src/fileio.c Tue Dec 06 07:39:05 2005 +0000 +++ b/src/fileio.c Tue Dec 06 07:39:37 2005 +0000 @@ -2730,8 +2730,10 @@ internal_delete_file (filename) Lisp_Object filename; { - return NILP (internal_condition_case_1 (Fdelete_file, filename, - Qt, internal_delete_file_1)); + Lisp_Object tem; + tem = internal_condition_case_1 (Fdelete_file, filename, + Qt, internal_delete_file_1); + return NILP (tem); } DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, @@ -6234,13 +6236,17 @@ #endif { /* Must do it the hard (and slow) way. */ + Lisp_Object tem; GCPRO3 (all, comp, specdir); count = SPECPDL_INDEX (); record_unwind_protect (read_file_name_cleanup, current_buffer->directory); current_buffer->directory = realdir; for (comp = Qnil; CONSP (all); all = XCDR (all)) - if (!NILP (call1 (Vread_file_name_predicate, XCAR (all)))) - comp = Fcons (XCAR (all), comp); + { + tem = call1 (Vread_file_name_predicate, XCAR (all)); + if (!NILP (tem)) + comp = Fcons (XCAR (all), comp); + } unbind_to (count, Qnil); UNGCPRO; }