mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 00:54:40 +00:00
[SETUPAPI] CM_Set_Class_Registry_PropertyW: Do not convert SD if ulLength is 0
This commit is contained in:
parent
4795177ced
commit
4d376dfd64
1 changed files with 12 additions and 8 deletions
|
@ -7975,17 +7975,21 @@ CM_Set_Class_Registry_PropertyW(
|
|||
|
||||
if (ulProperty == CM_CRP_SECURITY_SDS)
|
||||
{
|
||||
if (!ConvertStringSecurityDescriptorToSecurityDescriptorW((LPCWSTR)Buffer,
|
||||
SDDL_REVISION_1,
|
||||
&pSecurityDescriptor,
|
||||
&SecurityDescriptorSize))
|
||||
if (ulLength != 0)
|
||||
{
|
||||
ERR("ConvertStringSecurityDescriptorToSecurityDescriptorW() failed (Error %lu)\n", GetLastError());
|
||||
return CR_INVALID_DATA;
|
||||
if (!ConvertStringSecurityDescriptorToSecurityDescriptorW((LPCWSTR)Buffer,
|
||||
SDDL_REVISION_1,
|
||||
&pSecurityDescriptor,
|
||||
&SecurityDescriptorSize))
|
||||
{
|
||||
ERR("ConvertStringSecurityDescriptorToSecurityDescriptorW() failed (Error %lu)\n", GetLastError());
|
||||
return CR_INVALID_DATA;
|
||||
}
|
||||
|
||||
Buffer = (PCVOID)pSecurityDescriptor;
|
||||
ulLength = SecurityDescriptorSize;
|
||||
}
|
||||
|
||||
Buffer = (PCVOID)pSecurityDescriptor;
|
||||
ulLength = SecurityDescriptorSize;
|
||||
ulProperty = CM_CRP_SECURITY;
|
||||
ulType = REG_BINARY;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue