diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-19 18:18:35 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-19 18:18:35 +0000 |
commit | d3d28c441c1d0ce54196b581a2373d5c53fa5fe1 (patch) | |
tree | 91d5ddffa01ad39c24e4da613da1de4ddb960243 | |
parent | 1d4e52509554934d31693d3afbfdd98ebdb1780d (diff) |
if host() returns NULL, it is an error, so err the fuck out and don't
load bullshit
-rw-r--r-- | sbin/pfctl/parse.y | 8 |
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; |