summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 97dafa447f1..08852dd5246 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.352 2003/04/05 23:56:32 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.353 2003/04/07 13:40:48 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -3997,5 +3997,9 @@ parseicmpspec(char *w, sa_family_t af)
}
ulval = p->code;
}
+ if (ulval > 255) {
+ yyerror("invalid icmp code %ld", ulval);
+ return (0);
+ }
return (icmptype << 8 | ulval);
}