`set autologout = (15 1)' aborts

From: Giorgos Keramidas <keramida_at_freebsd.org>
Date: Thu, 24 Jan 2008 15:37:09 +0200
Hi Christos, Mark and everyone,

The following is a patch which fixes an abort() in tcsh 6.15.00 on
FreeBSD.  The proposed commit log explains why the change is needed,
so if we can get this committed upstream to the tcsh sources, then it
will find its way back to FreeBSD's src/contrib :)

%%%
tcsh: fix abort in cleanup_until(), caused by internal xgetpass()

The xgetpass() function pushes a cleanup entry for &osa, but then
attempts to flush the stack until an entry matching &sa.  The two
object pointers do not match, so the stack is popped too much,
and then cleanup_until calls abort() when it unexpectedly hits
the bottom of the cleanup stack.

Reported by:	Paul B. Mahol, onemda at gmail.com,
		Pietro Cerutti, gahr at gahr.ch

diff -r 2cc0e20ca15b -r ea3fdd703cbf contrib/tcsh/tc.func.c
--- a/contrib/tcsh/tc.func.c	Wed Jan 23 11:47:09 2008 +0000
+++ b/contrib/tcsh/tc.func.c	Thu Jan 24 15:33:31 2008 +0200
_at__at_ -632,7 +632,7 _at__at_
     }
     strbuf_terminate(&pass);
 
-    cleanup_until(&sa);
+    cleanup_until(&osa);
 
     return pass.s;
 }
%%%
Received on Thu Jan 24 2008 - 12:51:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC