diff options
author | keramida <keramida@FreeBSD.org> | 2008-07-20 18:05:18 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2008-07-20 18:05:18 +0000 |
commit | 42f134da57fb80e7e52e6e7ceb205e8ec4997fd4 (patch) | |
tree | b1a1969204991bbfd6b39cf5be15c2ac2581e8f9 | |
parent | b3b4a4830825f4530464460e6f3d8283b39ef889 (diff) | |
download | FreeBSD-src-42f134da57fb80e7e52e6e7ceb205e8ec4997fd4.zip FreeBSD-src-42f134da57fb80e7e52e6e7ceb205e8ec4997fd4.tar.gz |
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
PR: bin/124191
Reviewed by: mp, kris
MFC after: 2 days
-rw-r--r-- | contrib/tcsh/tc.func.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tcsh/tc.func.c b/contrib/tcsh/tc.func.c index e2db430..f04a5a4 100644 --- a/contrib/tcsh/tc.func.c +++ b/contrib/tcsh/tc.func.c @@ -632,7 +632,7 @@ xgetpass(const char *prm) } strbuf_terminate(&pass); - cleanup_until(&sa); + cleanup_until(&osa); return pass.s; } |