From: Hannu Nyman <hannu.nyman@iki.fi>
To: musl@lists.openwall.com
Cc: Hannu Nyman <hannu.nyman@iki.fi>
Subject: [PATCH] fix parsing of quoted time zone names
Date: Mon, 24 Oct 2016 13:12:24 +0300 [thread overview]
Message-ID: <20161024101224.3083-1-hannu.nyman@iki.fi> (raw)
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
reply other threads:[~2016-10-24 10:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161024101224.3083-1-hannu.nyman@iki.fi \
--to=hannu.nyman@iki.fi \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).