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:
parent
8d0392f9f7
commit
122609affb
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user