1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-11 08:23:49 +03:00

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.
This commit is contained in:
Volker Lendecke
2010-01-16 13:31:44 +01:00
parent 791a2df656
commit 4dd0c5516a

View File

@@ -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);