Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20161024101224.3083-1-hannu.nyman@iki.fi>
Date: Mon, 24 Oct 2016 13:12:24 +0300
From: Hannu Nyman <hannu.nyman@....fi>
To: musl@...ts.openwall.com
Cc: Hannu Nyman <hannu.nyman@....fi>
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.

---
Longer explanation in http://www.openwall.com/lists/musl/2016/10/19/1

 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 8b84b9b..0e0c4ea 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.10.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.