diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-03-20 20:54:09 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-03-20 20:54:09 +0000 |
commit | a8a78eb3cd207118c80c748c1938ddde1a68b819 (patch) | |
tree | 3e1592126495fdca56c0b688f796d58b746af1f9 /bin/ksh/c_sh.c | |
parent | 59c4ef87b769c1a36b20f45eab3060bb9dbc0d22 (diff) |
Fix potential null deref and out-of-bound access.
ok millert@ deraadt@
Diffstat (limited to 'bin/ksh/c_sh.c')
-rw-r--r-- | bin/ksh/c_sh.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index 458c88fd1b6..307cbf66add 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_sh.c,v 1.32 2006/03/12 00:26:58 deraadt Exp $ */ +/* $OpenBSD: c_sh.c,v 1.33 2006/03/20 20:54:08 otto Exp $ */ /* * built-in Bourne commands @@ -595,7 +595,8 @@ c_brkcont(char **wp) * shall be used. Doesn't say to print an error but we * do anyway 'cause the user messed up. */ - last_ep->flags &= ~EF_BRKCONT_PASS; + if (last_ep) + last_ep->flags &= ~EF_BRKCONT_PASS; warningf(true, "%s: can only %s %d level(s)", wp[0], wp[0], n - quit); } |