From e2ed37bc15fd4cf4ff1a258e1b8a6862077c04c5 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Mon, 4 Nov 2013 15:13:21 +0000 Subject: 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. --- src/time/__tz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/time') 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 { -- cgit v1.2.1