diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-24 19:14:07 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-24 19:14:07 +0000 |
commit | 702c78c15a6f5ae4880c3b18980319ad8a36dd2b (patch) | |
tree | d38c32504749f761506f7aa067561d0a7f8c2088 /sbin/pfctl/pfctl_parser.c | |
parent | 7dc9f569aa8af68d01cebcc3dcfa4558723e4ebd (diff) |
better netmask check
help canacar@
ok canacar@ cedric@
Diffstat (limited to 'sbin/pfctl/pfctl_parser.c')
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index f40c6c75feb..5881be4686c 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.160 2003/05/19 20:21:53 henning Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.161 2003/05/24 19:14:06 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -988,7 +988,7 @@ host(const char *s) if ((p = strrchr(s, '/')) != NULL) { mask = strtol(p+1, &q, 0); - if (!q || *q || mask > 128) { + if (!q || *q || mask > 128 || q == (p+1)) { fprintf(stderr, "invalid netmask\n"); return (NULL); } |