summaryrefslogtreecommitdiff
path: root/source3/client
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
commit7f7b754483863f94f32c6150c62710c5affcd390 (patch)
tree921189321ba8501bbe4df78ed5b2d1834e863482 /source3/client
parentbcd659f26aa8e41d24739ea0feb14decfdb675d6 (diff)
downloadsamba-7f7b754483863f94f32c6150c62710c5affcd390.tar.gz
samba-7f7b754483863f94f32c6150c62710c5affcd390.tar.bz2
samba-7f7b754483863f94f32c6150c62710c5affcd390.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. (This used to be commit f93a2831f1b4e5751ca86d46a6e5ede9adf660cb)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index a132b70584..5bc125ad07 100644
--- a/source3/client/client.c
+++ b/source3/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;