summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 0b0ef83bee..d73f73f9ec 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -464,9 +464,8 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ntstatus_to_werror(ndr_map_error2ntstatus(ndr_err));
}
-
blob = ndr_push_blob(ndr);
- memcpy(r->out.service, blob.data, r->in.offered);
+ memcpy(r->out.service, blob.data, MIN(blob.length, r->in.offered));
}
*r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;