summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse/parse_srv.c')
-rw-r--r--source3/rpc_parse/parse_srv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index 672db36a28..531267c308 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -1119,8 +1119,10 @@ BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *
if(!prs_uint32("total_entries", ps, depth, &r_n->total_entries))
return False;
- if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
- return False;
+ if(r_n->total_entries != 0) {
+ if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
+ return False;
+ }
if(!prs_werror("status", ps, depth, &r_n->status))
return False;