projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7211551
)
fix mishandling of empty or blank TZ environment variable
author
Rich Felker
<dalias@aerifal.cx>
Sat, 24 Aug 2013 03:07:09 +0000
(23:07 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 24 Aug 2013 03:07:09 +0000
(23:07 -0400)
the empty TZ string was matching equal to the initial value of the
cached TZ name, thus causing do_tzset never to run and never to
initialize the time zone data.
src/time/__tz.c
patch
|
blob
|
history
diff --git
a/src/time/__tz.c
b/src/time/__tz.c
index a76a7b4865149305d693aababac85a6c64ec1df1..36b59802aa5865cbbf00972cad8e4bcb2070aa18 100644
(file)
--- a/
src/time/__tz.c
+++ b/
src/time/__tz.c
@@
-127,7
+127,7
@@
static void do_tzset()
"/usr/share/zoneinfo/\0/share/zoneinfo/\0/etc/zoneinfo/\0";
s = getenv("TZ");
- if (!s
) s = "
";
+ if (!s
|| !*s) s = "GMT0
";
if (old_tz && !strcmp(s, old_tz)) return;