diff options
author | Ron Yorston <rmy@pobox.com> | 2021-09-18 09:33:21 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-09-18 09:33:21 +0100 |
commit | 48ddce5e9a063d89689ffe4be1680767186e13ee (patch) | |
tree | d5b0a4dc2b988c5802620e6a48afca01427aaf5c /shell | |
parent | 5f652529e4e62e9b98ccded179e773c5ae2fac55 (diff) | |
download | busybox-w32-48ddce5e9a063d89689ffe4be1680767186e13ee.tar.gz busybox-w32-48ddce5e9a063d89689ffe4be1680767186e13ee.tar.bz2 busybox-w32-48ddce5e9a063d89689ffe4be1680767186e13ee.zip |
win32: limited version of timegm(3)
timegm(3) from musl checks that the calculated time_t value can
be broken out into a struct tm without overflow. The limiting
factor is that tm_year is an int.
Our only use of timegm(3) is followed by a call to localtime(3).
The Microsoft version of this only works for time_t values between
0 and INT_MAX (32-bit) or 0 and 32535215999 (64-bit).
Enforce these limits in timegm(3), thus avoiding the use of musl's
__secs_to_tm() and saving 624 bytes.
Diffstat (limited to 'shell')
0 files changed, 0 insertions, 0 deletions