about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-11-22 17:26:36 -0500
committerRich Felker <dalias@aerifal.cx>2020-11-22 17:26:36 -0500
commitc17cda6d61bc24d5bb51b0837d951da063a1fba5 (patch)
tree638ca809c50470e97fc4d668b852891e4609ad97 /src
parent585a0a78f96c6968a44b32d07d7bb5c4abf75655 (diff)
downloadmusl-c17cda6d61bc24d5bb51b0837d951da063a1fba5.tar.gz
musl-c17cda6d61bc24d5bb51b0837d951da063a1fba5.tar.xz
musl-c17cda6d61bc24d5bb51b0837d951da063a1fba5.zip
parse v3 or future-unknown zoneinfo file versions as v2+
the v1 zoneinfo format with 32-bit time is deprecated. previously, the
v2 parsing code was only used if an exact match for '2' was found in
the version field of the header. this was already incorrect for v3
files (trivial differences from v2 that arguably didn't merit a new
version number anyway) but also failed to be future-proof.
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 2eb6ab4e..09a6317e 100644
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -185,7 +185,7 @@ static void do_tzset()
 	zi = map;
 	if (map) {
 		int scale = 2;
-		if (map[4]=='2') {
+		if (map[4]!='1') {
 			size_t skip = zi_dotprod(zi+20, VEC(1,1,8,5,6,1), 6);
 			trans = zi+skip+44+44;
 			scale++;