diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/signals.c | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 49bf1b03a..aa9b04c9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-09-14 Peter Stephenson <pws@csr.com> + + * 28258: Src/signals.c: bug in 28250 could cause undefined + variable resulting in mayhem. + 2010-09-13 Peter Stephenson <pws@csr.com> * unposted: NEWS: add POSIX_TRAPS @@ -13636,5 +13641,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5079 $ +* $Revision: 1.5080 $ ***************************************************** diff --git a/Src/signals.c b/Src/signals.c index d107b46d1..456a85300 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -951,7 +951,7 @@ endtrapscope(void) { LinkNode ln; struct savetrap *st; - int exittr; + int exittr = 0; void *exitfn = NULL; /* @@ -959,9 +959,8 @@ endtrapscope(void) * after all the other traps have been put back. * Don't do this inside another trap. */ - if (intrap) - exittr = 0; - else if (!isset(POSIXTRAPS) && (exittr = sigtrapped[SIGEXIT])) { + if (!intrap && + !isset(POSIXTRAPS) && (exittr = sigtrapped[SIGEXIT])) { if (exittr & ZSIG_FUNC) { exitfn = removehashnode(shfunctab, "TRAPEXIT"); } else { |