This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix p_secstodate overflow handling (bug 22463)


On Tue, 21 Nov 2017, Paul Eggert wrote:

> If you'd rather not add intprops.h to glibc, the TIME_T_MAX macros from
> elsewhere in glibc could be duped here. However, I think it's time to

Both intprops.h and TIME_T_MAX seem massively over-engineered for the 
present bug; neither the buffer overrun, not the build failure, nor 
handling of out-of-range u_long values should need a 500-line patch.  
Since time_t is always at least as wide as long in glibc, "clock < 0" is 
entirely sufficient to detect the case of a u_long value that does not fit 
in time_t.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]