mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
don't jump outside _SEH_TRY with goto in ObpCaptureObjectAttributes()
svn path=/trunk/; revision=18393
This commit is contained in:
parent
a4bfa110a8
commit
e0191cfd2a
1 changed files with 22 additions and 22 deletions
|
@ -155,7 +155,7 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||||
Status = STATUS_INVALID_PARAMETER;
|
Status = STATUS_INVALID_PARAMETER;
|
||||||
DPRINT1("Invalid Size: %lx or Attributes: %lx\n",
|
DPRINT1("Invalid Size: %lx or Attributes: %lx\n",
|
||||||
ObjectAttributes->Length, ObjectAttributes->Attributes);
|
ObjectAttributes->Length, ObjectAttributes->Attributes);
|
||||||
goto Quickie;
|
_SEH_LEAVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set some Create Info */
|
/* Set some Create Info */
|
||||||
|
@ -179,7 +179,7 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||||
{
|
{
|
||||||
DPRINT1("Unable to capture the security descriptor!!!\n");
|
DPRINT1("Unable to capture the security descriptor!!!\n");
|
||||||
ObjectCreateInfo->SecurityDescriptor = NULL;
|
ObjectCreateInfo->SecurityDescriptor = NULL;
|
||||||
goto Quickie;
|
_SEH_LEAVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Probe done\n");
|
DPRINT("Probe done\n");
|
||||||
|
@ -212,33 +212,33 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||||
{
|
{
|
||||||
Status = _SEH_GetExceptionCode();
|
Status = _SEH_GetExceptionCode();
|
||||||
DPRINT1("Failed\n");
|
DPRINT1("Failed\n");
|
||||||
goto Quickie;
|
|
||||||
}
|
}
|
||||||
_SEH_END;
|
_SEH_END;
|
||||||
|
|
||||||
/* Now check if the Object Attributes had an Object Name */
|
if (NT_SUCCESS(Status))
|
||||||
if (LocalObjectName)
|
|
||||||
{
|
{
|
||||||
DPRINT("Name Buffer: %wZ\n", LocalObjectName);
|
/* Now check if the Object Attributes had an Object Name */
|
||||||
Status = ObpCaptureObjectName(ObjectName,
|
if (LocalObjectName)
|
||||||
LocalObjectName,
|
|
||||||
AccessMode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Clear the string */
|
|
||||||
RtlInitUnicodeString(ObjectName, NULL);
|
|
||||||
|
|
||||||
/* He can't have specified a Root Directory */
|
|
||||||
if (ObjectCreateInfo->RootDirectory)
|
|
||||||
{
|
{
|
||||||
DPRINT1("Invalid name\n");
|
DPRINT("Name Buffer: %wZ\n", LocalObjectName);
|
||||||
Status = STATUS_OBJECT_NAME_INVALID;
|
Status = ObpCaptureObjectName(ObjectName,
|
||||||
|
LocalObjectName,
|
||||||
|
AccessMode);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Clear the string */
|
||||||
|
RtlInitUnicodeString(ObjectName, NULL);
|
||||||
|
|
||||||
|
/* He can't have specified a Root Directory */
|
||||||
|
if (ObjectCreateInfo->RootDirectory)
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid name\n");
|
||||||
|
Status = STATUS_OBJECT_NAME_INVALID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
Quickie:
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to capture, cleaning up\n");
|
DPRINT1("Failed to capture, cleaning up\n");
|
||||||
ObpReleaseCapturedAttributes(ObjectCreateInfo);
|
ObpReleaseCapturedAttributes(ObjectCreateInfo);
|
||||||
|
|
Loading…
Reference in a new issue