summaryrefslogtreecommitdiff
path: root/sbin/pfctl
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/parse.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 573f12112d2..c4393aaacc9 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.385 2003/05/17 02:04:24 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.386 2003/05/19 18:18:34 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1729,6 +1729,12 @@ host_list : xhost { $$ = $1; }
xhost : not host {
struct node_host *n;
+ if ($2 == NULL) {
+ /* error. "any" is handled elsewhere */
+ yyerror("could not parse host specification");
+ YYERROR;
+ }
+
for (n = $2; n != NULL; n = n->next)
n->not = $1;
$$ = $2;