mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
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 commit is contained in:
parent
3498624d94
commit
f93a2831f1
@ -481,6 +481,11 @@ static void do_list_helper(file_info *f, const char *mask, void *state)
|
|||||||
pstring mask2;
|
pstring mask2;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
if (!f->name[0]) {
|
||||||
|
d_printf("Empty dir name returned. Possible server misconfiguration.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pstrcpy(mask2, mask);
|
pstrcpy(mask2, mask);
|
||||||
p = strrchr_m(mask2,'\\');
|
p = strrchr_m(mask2,'\\');
|
||||||
if (!p) return;
|
if (!p) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user