summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ifstated/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ifstated/parse.y')
-rw-r--r--usr.sbin/ifstated/parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y
index 6ffa2098ad6..4794352c21a 100644
--- a/usr.sbin/ifstated/parse.y
+++ b/usr.sbin/ifstated/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.35 2014/11/03 18:44:36 bluhm Exp $ */
+/* $OpenBSD: parse.y,v 1.36 2014/11/20 05:51:20 jsg Exp $ */
/*
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
@@ -568,6 +568,9 @@ top:
} else if (c == quotec) {
*p = '\0';
break;
+ } else if (c == '\0') {
+ yyerror("syntax error");
+ return (findeol());
}
if (p + 1 >= buf + sizeof(buf) - 1) {
yyerror("string too long");