diff options
author | Michael Adam <obnox@samba.org> | 2013-08-21 15:29:44 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-08-21 10:31:19 -0700 |
commit | 122609affbde4b7ec0adcbc716440b3b4b4fae31 (patch) | |
tree | c939f6491218b20fcf2bd0ae15f42014e2069896 /source3 | |
parent | 8d0392f9f7973e72a6082d66f81180d19eb0a56f (diff) | |
download | samba-122609affbde4b7ec0adcbc716440b3b4b4fae31.tar.gz samba-122609affbde4b7ec0adcbc716440b3b4b4fae31.tar.bz2 samba-122609affbde4b7ec0adcbc716440b3b4b4fae31.zip |
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>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/smbtree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index 5c07b122b2..76ee6489b9 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -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); } |