mirror of
https://github.com/reactos/reactos.git
synced 2025-07-01 12:11:21 +00:00
[NTOSKRNL:OB]
- Actually fail when the maximum number of reparse attempts is reached in ObpLookupObjectName. It previously returned a pointer to whatever object was currently in charge of parsing, but without taking a reference to it. - Fixes 'Header->HandleCount == 0' assertion failure (on \REGISTRY object) after running ntdll_winetest:reg three times (and also fixes the remaining test failure) svn path=/trunk/; revision=58281
This commit is contained in:
parent
f65ef1e725
commit
358bfbd6c8
1 changed files with 7 additions and 2 deletions
|
@ -437,7 +437,7 @@ ObpLookupObjectName(IN HANDLE RootHandle OPTIONAL,
|
||||||
}
|
}
|
||||||
else if (!(ObjectName->Length) || !(ObjectName->Buffer))
|
else if (!(ObjectName->Length) || !(ObjectName->Buffer))
|
||||||
{
|
{
|
||||||
/* Just return the Root Directory if we didn't get a name*/
|
/* Just return the Root Directory if we didn't get a name */
|
||||||
Status = ObReferenceObjectByPointer(RootDirectory,
|
Status = ObReferenceObjectByPointer(RootDirectory,
|
||||||
0,
|
0,
|
||||||
ObjectType,
|
ObjectType,
|
||||||
|
@ -719,7 +719,7 @@ ParseFromRoot:
|
||||||
if (ObjectNameInfo->Name.Buffer)
|
if (ObjectNameInfo->Name.Buffer)
|
||||||
{
|
{
|
||||||
/* Free it */
|
/* Free it */
|
||||||
ExFreePoolWithTag(ObjectNameInfo->Name.Buffer, OB_NAME_TAG );
|
ExFreePoolWithTag(ObjectNameInfo->Name.Buffer, OB_NAME_TAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write new one */
|
/* Write new one */
|
||||||
|
@ -796,6 +796,11 @@ ReparseObject:
|
||||||
/* Reparse again */
|
/* Reparse again */
|
||||||
Reparse = TRUE;
|
Reparse = TRUE;
|
||||||
--MaxReparse;
|
--MaxReparse;
|
||||||
|
if (MaxReparse == 0)
|
||||||
|
{
|
||||||
|
Object = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Start over from root if we got sent back there */
|
/* Start over from root if we got sent back there */
|
||||||
if ((Status == STATUS_REPARSE_OBJECT) ||
|
if ((Status == STATUS_REPARSE_OBJECT) ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue