History log of /seL4-refos-master/libs/libmuslc/src/time/__secs_to_tm.c
Revision Date Author Comments
# bc1e7731 02-Nov-2016 Daniel Sabogal <dsabogal@ufl.edu>

fix integer overflow of tm_year in __secs_to_tm

the overflow check for years+100 did not account for the extra
year computed from the remaining months. instead, perform this
check after obtaining the final number of years.


# c82d3bad 08-Oct-2015 Rich Felker <dalias@aerifal.cx>

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.


# 1cc81f5c 17-Jul-2013 Rich Felker <dalias@aerifal.cx>

the big time handling overhaul

this commit has two major user-visible parts: zoneinfo-format time
zones are now supported, and overflow handling is intended to be
complete in the sense that all functions return a correct result if
and only if the result fits in the destination type, and otherwise
return an error. also, some noticable bugs in the way DST detection
and normalization worked have been fixed, and performance may be
better than before, but it has not been tested.