summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-04-28 01:08:31 +0200
committerGünther Deschner <gd@samba.org>2009-04-28 10:37:34 +0200
commitdd33abf649f4e1479365a2ccc2b41134270ff4ac (patch)
tree5573df0a06584d542fcd80ba6565767417e10d54 /source3
parent6af92c022865412a7447b1f2ef9828a57199fce0 (diff)
downloadsamba-dd33abf649f4e1479365a2ccc2b41134270ff4ac.tar.gz
samba-dd33abf649f4e1479365a2ccc2b41134270ff4ac.tar.bz2
samba-dd33abf649f4e1479365a2ccc2b41134270ff4ac.zip
s3-svcctl: Fix crash in _svcctl_EnumServicesStatusW().
The resume handle is a unique pointer, always check before dereference. Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c4
1 files changed, 3 insertions, 1 deletions
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;
}