about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/signals.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d5f55d8b..c6fb2f1fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-09  Clint Adams  <schizo@debian.org>
+
+	* 11839: Src/signals.c: prevent segmentation fault in
+	endtrapscope() by not dereferencing null pointers.
+
 2000-06-09  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 11836: Src/Zle/compcore.c, Src/Zle/complist.c: fix for
diff --git a/Src/signals.c b/Src/signals.c
index 9b9ef97aa..264b68a53 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -853,7 +853,7 @@ endtrapscope(void)
 	    if (sigtrapped[sig])
 		unsettrap(sig);
 	    sigtrapped[sig] = st->flags;
-	    if (st->flags) {
+	    if (st->flags && (st->list != NULL)) {
 		Eprog prog = (st->flags & ZSIG_FUNC) ?
 		    ((Shfunc) st->list)->funcdef : (Eprog) st->list;
 		/* prevent settrap from saving this */