From owner-freebsd-sparc64@FreeBSD.ORG Sun Feb 22 11:16:24 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF26B16A4CE for ; Sun, 22 Feb 2004 11:16:24 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ACE543D1F for ; Sun, 22 Feb 2004 11:16:24 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.10/8.12.10) with ESMTP id i1MJGLOE040774; Sun, 22 Feb 2004 11:16:22 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i1MJGLZj053746; Sun, 22 Feb 2004 11:16:21 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i1MJGJeL053745; Sun, 22 Feb 2004 11:16:19 -0800 (PST) (envelope-from marcel) Date: Sun, 22 Feb 2004 11:16:18 -0800 From: Marcel Moolenaar To: Dag-Erling Sm?rgrav Message-ID: <20040222191618.GB53610@dhcp01.pn.xcllnt.net> References: <20040215060047.GA62840@dhcp01.pn.xcllnt.net> <20040215165913.M30161@grogged.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: Garance A Drosihn cc: sparc64@freebsd.org Subject: Re: Problem with DHCLIENT vs 64-bit time_t X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 19:16:24 -0000 On Sun, Feb 22, 2004 at 11:45:52AM +0100, Dag-Erling Sm?rgrav wrote: > > Only takes a few minutes of eyeballing to figure out that the problem > is most likely on line 424 of src/contrib/isc-dhcp/common/parse.c: > > convert_num (cfile, (unsigned char *)timep, val, 10, 32); > > idiotically, the final argument to convert_num() is supposed to be the > size in bits of the number to store in the location pointed to by the > second argument. The simplest fix is to use a temporary int32_t and > assign it to *timep later, since convert_num() can't deal with 64-bit > quantities. See attached (untested) patch. This code is then obviously also broken on amd64 and ia64 and thus makes the bug more severe. A work-around seems to be in order until isc-dhcp gets upgraded. IMO of course, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net