mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
[NTOS:CM]
- Always fill out KEY_NAME_INFORMATION::NameLength in CmpQueryNameInformation if enough space is available. Fixes ntdll:reg test failures. CORE-9403 #resolve svn path=/trunk/; revision=66844
This commit is contained in:
parent
05cb3136be
commit
9e600f0e65
|
@ -1543,9 +1543,14 @@ CmpQueryNameInformation(
|
|||
|
||||
_SEH2_TRY
|
||||
{
|
||||
*ResultLength = NeededLength + FIELD_OFFSET(KEY_NAME_INFORMATION, Name[0]);
|
||||
if (Length < *ResultLength)
|
||||
*ResultLength = FIELD_OFFSET(KEY_NAME_INFORMATION, Name) + NeededLength;
|
||||
if (Length < RTL_SIZEOF_THROUGH_FIELD(KEY_NAME_INFORMATION, NameLength))
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
if (Length < *ResultLength)
|
||||
{
|
||||
KeyNameInfo->NameLength = NeededLength;
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
}
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue