summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2013-11-04 17:07:28 +0000
committerrofl0r <retnyg@gmx.net>2013-11-04 17:07:34 +0000
commit8db165258117851e7c5b766ed364e800f18bb40e (patch)
treef4c93844d9e57d4df1137aa43953462b280e2c5c
parent75be448958f18b230f9eedf8c44dccb9b4012099 (diff)
downloadmusl-8db165258117851e7c5b766ed364e800f18bb40e.tar.gz
musl-8db165258117851e7c5b766ed364e800f18bb40e.tar.bz2
musl-8db165258117851e7c5b766ed364e800f18bb40e.tar.xz
musl-8db165258117851e7c5b766ed364e800f18bb40e.zip
timezone parser: fix iteration over search dir paths
try+l points to \0, so only one iteration was ever tried.
-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 26f4ea4c..b4358f71 100644
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -162,7 +162,7 @@ static void do_tzset()
break;
memcpy(pathname, s, l+1);
pathname[l] = 0;
- for (try=search; !map && *try; try+=l) {
+ for (try=search; !map && *try; try+=l+1) {
l = strlen(try);
memcpy(pathname-l, try, l);
map = __map_file(pathname-l, &map_size);