]> granicus.if.org Git - musl/commitdiff
timezone parser: fix offset to transition table in 64bit code path
authorrofl0r <retnyg@gmx.net>
Mon, 4 Nov 2013 15:57:51 +0000 (15:57 +0000)
committerrofl0r <retnyg@gmx.net>
Mon, 4 Nov 2013 15:59:17 +0000 (15:59 +0000)
we need to skip to the second TZif header, which starts at
skip+44, and then skip another header (20 bytes) plus the following
6 32bit values.

src/time/__tz.c

index 47964c4b34e081daaebd32ef29555446dcf5acbb..26f4ea4cb404ae8a1e62434fb238f12c649133f5 100644 (file)
@@ -177,7 +177,7 @@ static void do_tzset()
                int scale = 2;
                if (sizeof(time_t) > 4 && map[4]=='2') {
                        size_t skip = zi_dotprod(zi+20, VEC(1,1,8,5,6,1), 6);
-                       trans = zi+skip+44+20;
+                       trans = zi+skip+44+44;
                        scale++;
                } else {
                        trans = zi+44;