Fix p_secstodate overflow handling (bug 22463)

Joseph Myers joseph@codesourcery.com
Tue Nov 21 14:07:00 GMT 2017


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



More information about the Libc-alpha mailing list