mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +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 (ulProperty == CM_CRP_SECURITY_SDS)
|
||||||
{
|
{
|
||||||
if (!ConvertStringSecurityDescriptorToSecurityDescriptorW((LPCWSTR)Buffer,
|
if (ulLength != 0)
|
||||||
SDDL_REVISION_1,
|
|
||||||
&pSecurityDescriptor,
|
|
||||||
&SecurityDescriptorSize))
|
|
||||||
{
|
{
|
||||||
ERR("ConvertStringSecurityDescriptorToSecurityDescriptorW() failed (Error %lu)\n", GetLastError());
|
if (!ConvertStringSecurityDescriptorToSecurityDescriptorW((LPCWSTR)Buffer,
|
||||||
return CR_INVALID_DATA;
|
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;
|
ulProperty = CM_CRP_SECURITY;
|
||||||
ulType = REG_BINARY;
|
ulType = REG_BINARY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue