summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-16 13:31:44 +0100
committerVolker Lendecke <vl@samba.org>2010-01-16 13:53:26 +0100
commit4dd0c5516aa0ff27093f9fc436f7817d048c0922 (patch)
tree2248299bbed7b08c40b6078f05b5c9129ec3f562 /source3
parent791a2df656a1af81d3c016902ae4b4ceb1c732f0 (diff)
downloadsamba-4dd0c5516aa0ff27093f9fc436f7817d048c0922.tar.gz
samba-4dd0c5516aa0ff27093f9fc436f7817d048c0922.tar.bz2
samba-4dd0c5516aa0ff27093f9fc436f7817d048c0922.zip
s3: Fix a crash in libsmbclient used against the OpenSolaris CIFS server
A user has sent me a sniff where the OpenSolaris CIFS server returns "32" in totalentries, but the array in ctr only contains 15 entries. Look at the right delimiter for walking the array.
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmb_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 6c0b1b4e28..de637a80e8 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -303,7 +303,7 @@ net_share_enum_rpc(struct cli_state *cli,
}
/* For each returned entry... */
- for (i = 0; i < total_entries; i++) {
+ for (i = 0; i < info_ctr.ctr.ctr1->count; i++) {
/* pull out the share name */
fstrcpy(name, info_ctr.ctr.ctr1->array[i].name);