Date: Sun, 22 Feb 2004 11:16:18 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Dag-Erling Sm?rgrav <des@des.no> Cc: sparc64@freebsd.org Subject: Re: Problem with DHCLIENT vs 64-bit time_t Message-ID: <20040222191618.GB53610@dhcp01.pn.xcllnt.net> In-Reply-To: <xzpznbbwfxb.fsf@dwp.des.no> References: <p06020407bc533f0ae9d2@[128.113.24.47]> <20040215060047.GA62840@dhcp01.pn.xcllnt.net> <p0602040ebc54c885236b@[128.113.24.47]> <20040215165913.M30161@grogged.dyndns.org> <p06020425bc571c20bcde@[128.113.24.47]> <p06020466bc5e09bf7182@[128.113.24.47]> <xzpznbbwfxb.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040222191618.GB53610>