summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/utils.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ca5d401ab..d1b385f86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-01-04 Peter Stephenson <p.w.stephenson@ntlworld.com>
+ * 34092: Src/utils.c: miscount of buffer length in symlink
+ resolution after ".." caused error with whence -S.
+
* 34091: Src/utils.c: typo with "whence -s" expansions.
* users/19682: Doc/Zsh/builtins.yo: document recommended use of
diff --git a/Src/utils.c b/Src/utils.c
index 959df9ab7..390f513ba 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -741,6 +741,8 @@ xsymlinks(char *s, int full)
while (*--p != '/')
xbuflen--;
*p = '\0';
+ /* The \0 isn't included in the length */
+ xbuflen--;
continue;
}
sprintf(xbuf2, "%s/%s", xbuf, *pp);