1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-14 22:50:55 +01:00

34092: fix miscount of symlink resolution for "..".

This caused problems with expanding a path with ".." in "whence -S".
This commit is contained in:
Peter Stephenson 2015-01-04 19:42:45 +00:00
parent f9cba834cd
commit 98f465c09f
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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);