diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-19 18:21:02 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-19 18:21:02 +0000 |
commit | 4f2bd90658dafca4783e555b8ba0b6eff8e15e88 (patch) | |
tree | d9435c8ed17d3c44dd338a1fa1c082c91bfc91f2 /sbin | |
parent | 8736961347c2dae2dbd22bb972ecb02c946a9d44 (diff) |
err out on obviously wrong netmasks
Diffstat (limited to 'sbin')
-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 ed4a713917b..016a4c576d7 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.158 2003/05/17 02:04:24 henning Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.159 2003/05/19 18:21:01 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -965,7 +965,7 @@ host(const char *s) if ((p = strrchr(s, '/')) != NULL) { mask = strtol(p+1, &q, 0); - if (!q || *q) { + if (!q || *q || mask > 128) { fprintf(stderr, "invalid netmask\n"); return (NULL); } |