summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2013-11-04 15:13:21 +0000
committerrofl0r <retnyg@gmx.net>2013-11-04 15:13:21 +0000
commite2ed37bc15fd4cf4ff1a258e1b8a6862077c04c5 (patch)
tree8e6a93c30c782f5a688b95a0d85d390aa03165e3 /src
parent7b5beabceb3ae644acf793a249bbf564faf1ebe6 (diff)
downloadmusl-e2ed37bc15fd4cf4ff1a258e1b8a6862077c04c5.tar.gz
fix timezone parser code crashing on 64bit sys
if sizeof(time_t) == 8, this code path was missing the correct offset into the zoneinfo file, using the header magic to do offset calculations. the 6 32bit fields to be read start at offset 20.
Diffstat (limited to 'src')
-rw-r--r--src/time/__tz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time/__tz.c b/src/time/__tz.c
index 81676d3b..47964c4b 100644
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -176,7 +176,7 @@ static void do_tzset()
if (map) {
int scale = 2;
if (sizeof(time_t) > 4 && map[4]=='2') {
- size_t skip = zi_dotprod(zi, VEC(1,1,8,5,6,1), 6);
+ size_t skip = zi_dotprod(zi+20, VEC(1,1,8,5,6,1), 6);
trans = zi+skip+44+20;
scale++;
} else {