From bcbd2043ec9118c7fd6c1eab666392ae5d201728 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Tue, 3 Oct 2006 00:49:09 +0000 Subject: [PATCH] strtonum() with INT_MAX intead of LONG_MAX, problem pointed out by pierre-yves@spootnik.org --- src/usr.sbin/ntpd/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y index 4838f255..9e106415 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.29 2006/06/01 06:06:59 otto Exp $ */ +/* $OpenBSD: parse.y,v 1.30 2006/10/03 00:49:09 deraadt Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -209,7 +209,7 @@ number : STRING { u_long ulval; const char *errstr; - ulval = strtonum($1, 0, LONG_MAX, &errstr); + ulval = strtonum($1, 0, INT_MAX, &errstr); if (errstr) { yyerror("\"%s\" invalid: %s", $1, errstr); free($1);