about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2015-01-04 19:42:45 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2015-01-04 19:42:45 +0000
commit98f465c09f6edc56e8332de42fddee9b689b2ed6 (patch)
treeb430a733b3c042d3829ba6e6ba819b5b0cf48f36 /Src/utils.c
parentf9cba834cdcd5f35d21768b6412577236adc5ed2 (diff)
downloadzsh-98f465c09f6edc56e8332de42fddee9b689b2ed6.tar.gz
zsh-98f465c09f6edc56e8332de42fddee9b689b2ed6.tar.xz
zsh-98f465c09f6edc56e8332de42fddee9b689b2ed6.zip
34092: fix miscount of symlink resolution for "..".
This caused problems with expanding a path with ".." in "whence -S".
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c2
1 files changed, 2 insertions, 0 deletions
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);