Problem with DHCLIENT vs 64-bit time_t

Ken Smith kensmith at cse.Buffalo.EDU
Sun Feb 22 11:25:19 PST 2004


On Sun, Feb 22, 2004 at 11:16:18AM -0800, Marcel Moolenaar wrote:
> 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,
> 

Since the ISO's done I can try to take care of this if nobody else
wants to.  Would be nice to have it fixed before I do the next
snapshot (right after Garance does the real commit).

I'd just be trying to confirm Dag-Erling's patch works and then
running it by my mentor...

-- 
						Ken Smith
- From there to here, from here to      |       kensmith at cse.buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |


More information about the freebsd-sparc64 mailing list