diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-11-03 10:00:34 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-11-03 10:00:34 +0000 |
commit | a92507d2b8c41daaed6e9a018086392d9600a37a (patch) | |
tree | 8a474e905b12fb22418c4583b8f25ba82aa58119 | |
parent | 65e45654b3ef2708225b83f04d9c5f8a55d06143 (diff) | |
download | zsh-a92507d2b8c41daaed6e9a018086392d9600a37a.tar.gz zsh-a92507d2b8c41daaed6e9a018086392d9600a37a.tar.xz zsh-a92507d2b8c41daaed6e9a018086392d9600a37a.zip |
Mikael: 27337: fix bug searching for / when
scanning symlinks in cd
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/utils.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 5bfda7c85..01f1cb8f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 $ ***************************************************** diff --git a/Src/utils.c b/Src/utils.c index 230951ffc..bb18eb859 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -691,6 +691,8 @@ xsymlinks(char *s) zsfree(*pp); if (!strcmp(xbuf, "/")) continue; + if (!*xbuf) + continue; p = xbuf + strlen(xbuf); while (*--p != '/'); *p = '\0'; |