summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/parse.y
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2017-08-28 06:00:06 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2017-08-28 06:00:06 +0000
commit6e125a719ea91234184421b02fcd6a2cd1f80e16 (patch)
tree6cc16dbad46ebb4565cfbaaead8b2786183d57b9 /usr.sbin/relayd/parse.y
parent4a9fce5e0080c827e3cc28451398b6af38926c6c (diff)
65535 is a valid port to listen on.
Off-by-one pointed out by and diff from Kris Katterjohn katterjohn AT gmail, thanks! chris@ pointed out that more than httpd(8) is effected. OK gilles@
Diffstat (limited to 'usr.sbin/relayd/parse.y')
-rw-r--r--usr.sbin/relayd/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 5e318601f26..5e357bb7eb2 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.215 2017/05/27 08:33:25 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.216 2017/08/28 06:00:05 florian Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -338,7 +338,7 @@ port : PORT STRING {
free($2);
}
| PORT NUMBER {
- if ($2 <= 0 || $2 >= (int)USHRT_MAX) {
+ if ($2 <= 0 || $2 > (int)USHRT_MAX) {
yyerror("invalid port: %d", $2);
YYERROR;
}