From dd33abf649f4e1479365a2ccc2b41134270ff4ac Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 28 Apr 2009 01:08:31 +0200 Subject: s3-svcctl: Fix crash in _svcctl_EnumServicesStatusW(). The resume handle is a unique pointer, always check before dereference. Guenther --- source3/rpc_server/srv_svcctl_nt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index f5b7b61020..f393a9a464 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -470,7 +470,9 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, *r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered; *r->out.services_returned = (uint32)num_services; - *r->out.resume_handle = 0x0; + if (r->out.resume_handle) { + *r->out.resume_handle = 0; + } return result; } -- cgit