summaryrefslogtreecommitdiffstats
path: root/libc/tzcode/localtime.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix an infinite loop in time2sub.David 'Digit' Turner2009-09-091-12/+47
| | | | | | | | | | | | | | | | The problem is that time_t is signed, and the original code relied on the fact that (X + c < X) in case of overflow for c >= 0. Unfortunately, this condition is only guaranteed by the standard for unsigned arithmetic, and the gcc 4.4.0 optimizer did completely remove the corresponding test from the code. This resulted in a missing boundary check, and an infinite loop. The problem is solved by testing explicitely for TIME_T_MIN and TIME_T_MAX in the loop that uses this. Also fix increment_overflow and long_increment_overflow which were buggy for exactly the same reasons. Note: a similar fix is needed for system/core/libcutils
* auto import //branches/master/...@140412The Android Open Source Project2009-03-181-1541/+1590
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+2132
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-2132/+0
|
* Initial Contributionandroid-1.0The Android Open Source Project2008-10-211-0/+2132