summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-02-08 18:44:33 -0800
committerJeremy Allison <jra@samba.org>2008-02-08 18:44:33 -0800
commit73d838a2da48f8d5eac741346e3b0b39f8ecb55b (patch)
tree369503bc7311cf3f4b9f706124343908ea27a4d6 /source3
parent7ec5bfc49f912b9908d6d73eb541b5a5748f8f83 (diff)
downloadsamba-73d838a2da48f8d5eac741346e3b0b39f8ecb55b.tar.gz
samba-73d838a2da48f8d5eac741346e3b0b39f8ecb55b.tar.bz2
samba-73d838a2da48f8d5eac741346e3b0b39f8ecb55b.zip
From kukks - prevent crashes if finfo.name == NULL.
Jeremy. (This used to be commit 101f194795f87c709abfdfbcde710131a88f9d20)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clilist.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 2bad3e508b..2b5e7518c5 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -377,6 +377,12 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
&resume_key,
&last_name_raw);
+ if (!finfo.name) {
+ DEBUG(0,("cli_list_new: Error: unable to parse name from info level %d\n",
+ info_level));
+ ff_eos = 1;
+ break;
+ }
if (!First && *mask && strcsequal(finfo.name, mask)) {
DEBUG(0,("Error: Looping in FIND_NEXT as name %s has already been seen?\n",
finfo.name));
@@ -442,6 +448,11 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
&finfo,
NULL,
NULL);
+ if (!finfo.name) {
+ DEBUG(0,("cli_list_new: unable to parse name from info level %d\n",
+ info_level));
+ break;
+ }
fn(mnt,&finfo, Mask, state);
}
}