aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0028-fix-parsing-of-quoted-time-zone-names.patch
blob: ac99f08db8563a5e2a90f13ce27e9187125261e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 8ca27ac4bfe73bff785d0c26c1de0da92b55e5c6 Mon Sep 17 00:00:00 2001
From: Hannu Nyman <hannu.nyman@iki.fi>
Date: Mon, 24 Oct 2016 13:12:24 +0300
Subject: [PATCH] fix parsing of quoted time zone names

Fix parsing of the < > quoted time zone names. Compare the correct
character instead of repeatedly comparing the first character.
---
 src/time/__tz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/time/__tz.c b/src/time/__tz.c
index 8b84b9bd..0e0c4ea2 100644
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -84,7 +84,7 @@ static void getname(char *d, const char **p)
 	int i;
 	if (**p == '<') {
 		++*p;
-		for (i=0; **p!='>' && i<TZNAME_MAX; i++)
+		for (i=0; (*p)[i]!='>' && i<TZNAME_MAX; i++)
 			d[i] = (*p)[i];
 		++*p;
 	} else {
-- 
2.11.0