mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] fix parsing of quoted time zone names
@ 2016-10-24 10:12 Hannu Nyman
  0 siblings, 0 replies; only message in thread
From: Hannu Nyman @ 2016-10-24 10:12 UTC (permalink / raw)
  To: musl; +Cc: Hannu Nyman

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-24 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24 10:12 [PATCH] fix parsing of quoted time zone names Hannu Nyman

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).