mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
r14338: Fix coverity #55 by explicit cast.
Jeremy. (This used to be commit 1fece52da4d667fa182aa9a87aaee3917860448b)
This commit is contained in:
parent
ed5095a490
commit
bd1e853c19
@ -416,11 +416,14 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
|
||||
if ( !info || (info->type != SVC_HANDLE_IS_SCM) )
|
||||
return WERR_BADFID;
|
||||
|
||||
if ( !(info->access_granted & SC_RIGHT_MGR_ENUMERATE_SERVICE) )
|
||||
if ( !(info->access_granted & SC_RIGHT_MGR_ENUMERATE_SERVICE) ) {
|
||||
return WERR_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
if ( (num_services = enumerate_status( p->mem_ctx, &services, token )) == -1 )
|
||||
num_services = enumerate_status( p->mem_ctx, &services, token );
|
||||
if (num_services == (uint32)-1 ) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
for ( i=0; i<num_services; i++ ) {
|
||||
buffer_size += svcctl_sizeof_enum_services_status(&services[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user