about summary refs log tree commit diff
path: root/Src/signals.c
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2000-06-09 14:40:54 +0000
committerClint Adams <clint@users.sourceforge.net>2000-06-09 14:40:54 +0000
commit716f5d4e3940ab5129eda866aa20b8fd2d458999 (patch)
treeff8a005a8daebbaf43b18ecadc88214eb696a491 /Src/signals.c
parent4997db3470da7dd8b538b6e8df953c309c1fdda6 (diff)
downloadzsh-716f5d4e3940ab5129eda866aa20b8fd2d458999.tar.gz
zsh-716f5d4e3940ab5129eda866aa20b8fd2d458999.tar.xz
zsh-716f5d4e3940ab5129eda866aa20b8fd2d458999.zip
11839: endtrapscope() null pointer dereference prevention
Diffstat (limited to 'Src/signals.c')
-rw-r--r--Src/signals.c2
1 files changed, 1 insertions, 1 deletions
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 */