about summary refs log tree commit diff
path: root/src/math
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2020-02-22 16:01:13 -0600
committerRich Felker <dalias@aerifal.cx>2020-03-21 12:47:09 -0400
commit33338ebc853d37c80f0f236cc7a92cb0acc6aace (patch)
treeea0bdec858a89dbb17ec830a35ac94037e5dd566 /src/math
parent8e452abae67db445fb6c3e37cd566c4788c2e8f3 (diff)
downloadmusl-33338ebc853d37c80f0f236cc7a92cb0acc6aace.tar.gz
musl-33338ebc853d37c80f0f236cc7a92cb0acc6aace.tar.xz
musl-33338ebc853d37c80f0f236cc7a92cb0acc6aace.zip
fix parsing offsets after long timezone names
TZ containg a timezone name with >TZNAME_MAX characters currently
breaks musl's timezone parsing. getname() stops after TZNAME_MAX
characters. getoff() will consume no characters (because the next
character is not a digit) and incorrectly return 0. Then, because
there are remaining alphabetic characters, __daylight == 1, and
dst_off == -3600.

getname() must consume the entire timezone name, even if it will not
fit in d/__tzname, so when it returns, s points to the offset digits.
Diffstat (limited to 'src/math')
0 files changed, 0 insertions, 0 deletions