1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 22:51:42 +02:00

Mikael: 27337: fix bug searching for / when

scanning symlinks in cd
This commit is contained in:
Peter Stephenson 2009-11-03 10:00:34 +00:00
parent 65e45654b3
commit a92507d2b8
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2009-11-03 Peter Stephenson <pws@csr.com>
* Mikael: 27337: Src/utils.c: fix bug with cd checking symlinks
that could do arbitrarily nasty things when looking for a "/".
2009-10-29 Peter Stephenson <pws@csr.com>
* unposted: Functions/Calendar/calendar: brief display
@ -12281,5 +12286,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4799 $
* $Revision: 1.4800 $
*****************************************************

View file

@ -691,6 +691,8 @@ xsymlinks(char *s)
zsfree(*pp);
if (!strcmp(xbuf, "/"))
continue;
if (!*xbuf)
continue;
p = xbuf + strlen(xbuf);
while (*--p != '/');
*p = '\0';