summaryrefslogtreecommitdiff
path: root/usr.bin/window/parser2.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-05-02 22:35:07 +0000
committerchristos <christos@NetBSD.org>2006-05-02 22:35:07 +0000
commitd1c2aa7c3ba3c58ecf33de8b0aeb4de27f69dc09 (patch)
tree1372d38b539fb0eed89897796e361a6d24313ea8 /usr.bin/window/parser2.c
parent4e749c0af764d640a1bd63dcce65cf5277efb03e (diff)
Coverity CID 1184: Avoid NULL deref.
Diffstat (limited to 'usr.bin/window/parser2.c')
-rw-r--r--usr.bin/window/parser2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/window/parser2.c b/usr.bin/window/parser2.c
index 78c28bc634d..32aa7a229a4 100644
--- a/usr.bin/window/parser2.c
+++ b/usr.bin/window/parser2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parser2.c,v 1.9 2006/05/02 22:33:42 christos Exp $ */
+/* $NetBSD: parser2.c,v 1.10 2006/05/02 22:35:07 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)parser2.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: parser2.c,v 1.9 2006/05/02 22:33:42 christos Exp $");
+__RCSID("$NetBSD: parser2.c,v 1.10 2006/05/02 22:35:07 christos Exp $");
#endif
#endif /* not lint */
@@ -144,7 +144,7 @@ p_function(char *name, struct value *v, int flag)
i = vp - av + 1;
lp = ap;
}
- if (vp->v_type != V_ERR) {
+ if (vp && vp->v_type != V_ERR) {
if (*ap->arg_name)
p_error("%s: Argument %d (%s) duplicated.",
name, vp - av + 1,