1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

smbtree: use the correct count variable from NetShareEnum result.

Fixes potential segfault, as for rpcclient from bug #10100

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Michael Adam 2013-08-21 15:29:44 +02:00 committed by Jeremy Allison
parent 8d0392f9f7
commit 122609affb

View File

@ -209,7 +209,7 @@ static bool get_rpc_shares(struct cli_state *cli,
return False;
}
for (i=0; i<total_entries; i++) {
for (i=0; i < info_ctr.ctr.ctr1->count; i++) {
struct srvsvc_NetShareInfo1 info = info_ctr.ctr.ctr1->array[i];
fn(info.name, info.type, info.comment, state);
}