From bbbc92f2eda2d2bcdb71f55eb4a36bb86bcffb7b Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 21 Feb 2004 20:53:03 -0500 Subject: [PATCH] e2fsck.c (e2fsck_run): Clear the SETJMP_OK flag when returning so we don't double longjump into an invalid stack frame. (Thanks to Matthias Andree for providing this fix.) --- e2fsck/ChangeLog | 6 ++++++ e2fsck/e2fsck.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index daf9e8b..f1502ab 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,9 @@ +2004-02-14 Theodore Ts'o + + * e2fsck.c (e2fsck_run): Clear the SETJMP_OK flag when returning + so we don't double longjump into an invalid stack frame. + (Thanks to Matthias Andree for providing this fix.) + 2004-01-31 Theodore Ts'o * problem.c (fix_problem): Don't call print_e2fsck_message if the diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c index 4c593f3..2a84c51 100644 --- a/e2fsck/e2fsck.c +++ b/e2fsck/e2fsck.c @@ -180,8 +180,10 @@ int e2fsck_run(e2fsck_t ctx) pass_t e2fsck_pass; #ifdef HAVE_SETJMP_H - if (setjmp(ctx->abort_loc)) + if (setjmp(ctx->abort_loc)) { + ctx->flags &= ~E2F_FLAG_SETJMP_OK; return (ctx->flags & E2F_FLAG_RUN_RETURN); + } ctx->flags |= E2F_FLAG_SETJMP_OK; #endif -- 1.8.3.1