summaryrefslogtreecommitdiffstats
path: root/source/client/client.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-07-17 04:17:58 +0000
committerTim Potter <tpot@samba.org>2003-07-17 04:17:58 +0000
commitf93a2831f1b4e5751ca86d46a6e5ede9adf660cb (patch)
tree09e3022dd00619d96a55b83632e19fee29eab920 /source/client/client.c
parent3498624d941fe200b06f114ece3373d4c4cfb2d1 (diff)
downloadsamba-f93a2831f1b4e5751ca86d46a6e5ede9adf660cb.tar.gz
samba-f93a2831f1b4e5751ca86d46a6e5ede9adf660cb.tar.xz
samba-f93a2831f1b4e5751ca86d46a6e5ede9adf660cb.zip
Fix for bug 222 from Marcin Owsiany.
Don't get stuck in an infinite loop listing directories recursively if the server returns an empty directory name. This can happen with incorrect i18n configuration on a Samba server.
Diffstat (limited to 'source/client/client.c')
-rw-r--r--source/client/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/client/client.c b/source/client/client.c
index a132b705844..5bc125ad075 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -481,6 +481,11 @@ static void do_list_helper(file_info *f, const char *mask, void *state)
pstring mask2;
char *p;
+ if (!f->name[0]) {
+ d_printf("Empty dir name returned. Possible server misconfiguration.\n");
+ return;
+ }
+
pstrcpy(mask2, mask);
p = strrchr_m(mask2,'\\');
if (!p) return;