diff options
author | 2009-02-07 14:03:24 +0000 | |
---|---|---|
committer | 2009-02-07 14:03:24 +0000 | |
commit | 2f61fa6011eaf3737b00c18f15ab235fa65bd217 (patch) | |
tree | 97b9c008867de5c7775e1db500d4ac67c08e9775 | |
parent | Unifdef __OpenBSD__, these defines don't help us to sync with NetBSD (diff) | |
download | wireguard-openbsd-2f61fa6011eaf3737b00c18f15ab235fa65bd217.tar.xz wireguard-openbsd-2f61fa6011eaf3737b00c18f15ab235fa65bd217.zip |
Ensure that *wp isn't NULL.
ok otto@
-rw-r--r-- | bin/ksh/c_ksh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/c_ksh.c b/bin/ksh/c_ksh.c index d2869225b53..e653975aeb1 100644 --- a/bin/ksh/c_ksh.c +++ b/bin/ksh/c_ksh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ksh.c,v 1.32 2009/02/07 07:24:37 guenther Exp $ */ +/* $OpenBSD: c_ksh.c,v 1.33 2009/02/07 14:03:24 kili Exp $ */ /* * built-in Korn commands: c_* @@ -229,7 +229,7 @@ c_print(char **wp) */ wp += 1; if (Flag(FPOSIX)) { - if (strcmp(*wp, "-n") == 0) { + if (*wp && strcmp(*wp, "-n") == 0) { flags &= ~PO_NL; wp++; } |