From 3130577acb03a06fd8de27ee6c2e4f82bd4b2008 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 30 Jul 2002 04:32:29 +0000 Subject: Some crash fixes for netshareenum returning zero shares. (This used to be commit a5a0ff8bd7ee4a3586647d14fd750ec6df73efa8) --- source3/libsmb/cli_srvsvc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/libsmb/cli_srvsvc.c') 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; -- cgit