mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
s3-svcctl: Fix _svcctl_EnumServicesStatusW() crash bug on too small buffer.
Guenther
This commit is contained in:
parent
9d2d07503a
commit
21b083a647
@ -468,9 +468,11 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
|
||||
}
|
||||
|
||||
blob = ndr_push_blob(ndr);
|
||||
if (blob.length >= r->in.buf_size) {
|
||||
memcpy(r->out.service, blob.data, r->in.buf_size);
|
||||
}
|
||||
}
|
||||
|
||||
r->out.service = blob.data;
|
||||
*r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
|
||||
*r->out.services_returned = (uint32)num_services;
|
||||
*r->out.resume_handle = 0x0;
|
||||
|
Loading…
Reference in New Issue
Block a user