From fc47aa1fccc0c1d8aa273b7831a032bae78d7d7e Mon Sep 17 00:00:00 2001 From: otto <> Date: Thu, 1 Jun 2006 06:06:59 +0000 Subject: [PATCH] even though the bounds are long long having an upper bound of ULONG_MAX does not work; the max upper bound is LONG_MAX, since LONG_MAX == LLONG_MAX on 64bit archs. ok deraadt@ henning@ --- src/usr.sbin/ntpd/parse.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y index 8405f861..4838f255 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.28 2006/05/28 20:39:16 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.29 2006/06/01 06:06:59 otto Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -208,7 +209,7 @@ number : STRING { u_long ulval; const char *errstr; - ulval = strtonum($1, 0, ULONG_MAX, &errstr); + ulval = strtonum($1, 0, LONG_MAX, &errstr); if (errstr) { yyerror("\"%s\" invalid: %s", $1, errstr); free($1);