summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-07-30 04:32:29 +0000
committerTim Potter <tpot@samba.org>2002-07-30 04:32:29 +0000
commit3130577acb03a06fd8de27ee6c2e4f82bd4b2008 (patch)
tree4cca147ad58c4f6eb1fb820981853f4237587c6b /source3/libsmb
parentd91cbdac92ca52c96148bc14b109865353728728 (diff)
downloadsamba-3130577acb03a06fd8de27ee6c2e4f82bd4b2008.tar.gz
samba-3130577acb03a06fd8de27ee6c2e4f82bd4b2008.tar.bz2
samba-3130577acb03a06fd8de27ee6c2e4f82bd4b2008.zip
Some crash fixes for netshareenum returning zero shares.
(This used to be commit a5a0ff8bd7ee4a3586647d14fd750ec6df73efa8)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cli_srvsvc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libsmb/cli_srvsvc.c b/source3/libsmb/cli_srvsvc.c
index b92b356241..1bdd19620b 100644
--- a/source3/libsmb/cli_srvsvc.c
+++ b/source3/libsmb/cli_srvsvc.c
@@ -116,6 +116,9 @@ WERROR cli_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx,
ZERO_STRUCTP(ctr);
+ if (!r.ctr.num_entries)
+ goto done;
+
ctr->info_level = info_level;
ctr->num_entries = r.ctr.num_entries;