commit | c82d3bada30cb27e14abda7859da5d2e784830ff | [log] [tgz] |
---|---|---|
author | Rich Felker <dalias@aerifal.cx> | Thu Oct 08 23:30:42 2015 +0000 |
committer | Rich Felker <dalias@aerifal.cx> | Thu Oct 08 23:30:42 2015 +0000 |
tree | 080b81ab7a2c1036c37bb07b46886c40c961fd52 | |
parent | 7b9f57f207b51132f188f750161953b7baf32154 [diff] |
fix integer overflows in time_t/struct tm conversion code as found and reported by Brian Mastenbrook, the expressions 400*qc_cycles and years+100 in __secs_to_tm were both subject to integer overflow for extreme values of the input t. this patch by Szabolcs Nagy fixes the code by switching to larger types, and matches the original intent I had in mind when writing this code.