Author: hbelusca
Date: Thu Sep 12 00:41:24 2013
New Revision: 60053
URL:
http://svn.reactos.org/svn/reactos?rev=60053&view=rev
Log:
Fix other _SEH2_YIELD() issues, spotted for most of them by Pigglesworth, the other by
myself.
I'm wondering how much remaining ones are in our code. Only the Lord knows...
Modified:
trunk/reactos/base/setup/vmwinst/vmwinst.c
trunk/reactos/drivers/storage/classpnp/class.c
trunk/reactos/lib/rtl/acl.c
trunk/reactos/lib/rtl/actctx.c
trunk/reactos/lib/rtl/sd.c
trunk/reactos/lib/rtl/sid.c
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
trunk/reactos/win32ss/user/user32/windows/text.c
Modified: trunk/reactos/base/setup/vmwinst/vmwinst.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/vmwinst…
==============================================================================
--- trunk/reactos/base/setup/vmwinst/vmwinst.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/vmwinst/vmwinst.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -96,14 +96,14 @@
}
#elif defined(_MSC_VER) && defined(_M_AMD64)
DPRINT1("DetectVMware stub\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
#else
#error TODO
#endif
}
_SEH2_EXCEPT(_SEH2_GetExceptionCode() == EXCEPTION_PRIV_INSTRUCTION ?
EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
{
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
_SEH2_END;
Modified: trunk/reactos/drivers/storage/classpnp/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/c…
==============================================================================
--- trunk/reactos/drivers/storage/classpnp/class.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/classpnp/class.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -2838,7 +2838,7 @@
DebugPrint((1, "ClassSendSrbSynchronous: Exception %lx "
"locking buffer\n", status));
- return status;
+ _SEH2_YIELD(return status);
} _SEH2_END;
}
Modified: trunk/reactos/lib/rtl/acl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/acl.c?rev=60053&am…
==============================================================================
--- trunk/reactos/lib/rtl/acl.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/acl.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -846,21 +846,21 @@
(Acl->AclRevision > MAX_ACL_REVISION))
{
DPRINT1("Invalid ACL revision\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Next, validate that the ACL is USHORT-aligned */
if (ROUND_DOWN(Acl->AclSize, sizeof(USHORT)) != Acl->AclSize)
{
DPRINT1("Invalid ACL size\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* And that it's big enough */
if (Acl->AclSize < sizeof(ACL))
{
DPRINT1("Invalid ACL size\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Loop each ACE */
@@ -871,21 +871,21 @@
if (((ULONG_PTR)Ace + sizeof(ACE_HEADER)) >= ((ULONG_PTR)Acl +
Acl->AclSize))
{
DPRINT1("Invalid ACE size\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Validate the length of this ACE */
if (ROUND_DOWN(Ace->AceSize, sizeof(USHORT)) != Ace->AceSize)
{
DPRINT1("Invalid ACE size: %lx\n", Ace->AceSize);
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Validate we have space for the entire ACE */
if (((ULONG_PTR)Ace + Ace->AceSize) > ((ULONG_PTR)Acl +
Acl->AclSize))
{
DPRINT1("Invalid ACE size %lx %lx\n", Ace->AceSize,
Acl->AclSize);
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Check what kind of ACE this is */
@@ -895,14 +895,14 @@
if (ROUND_DOWN(Ace->AceSize, sizeof(ULONG)) != Ace->AceSize)
{
DPRINT1("Invalid ACE size\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* The ACE size should at least have enough for the header */
if (Ace->AceSize < sizeof(ACE_HEADER))
{
DPRINT1("Invalid ACE size: %lx %lx\n", Ace->AceSize,
sizeof(ACE_HEADER));
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Check if the SID revision is valid */
@@ -910,21 +910,21 @@
if (Sid->Revision != SID_REVISION)
{
DPRINT1("Invalid SID\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* Check if the SID is out of bounds */
if (Sid->SubAuthorityCount > SID_MAX_SUB_AUTHORITIES)
{
DPRINT1("Invalid SID\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
/* The ACE size should at least have enough for the header and SID */
if (Ace->AceSize < (sizeof(ACE_HEADER) + RtlLengthSid(Sid)))
{
DPRINT1("Invalid ACE size\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
}
else if (Ace->AceType == ACCESS_ALLOWED_COMPOUND_ACE_TYPE)
@@ -942,7 +942,7 @@
if (Ace->AceSize < sizeof(ACE_HEADER))
{
DPRINT1("Unknown ACE\n");
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
}
@@ -953,7 +953,7 @@
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Something was invalid, fail */
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
_SEH2_END;
Modified: trunk/reactos/lib/rtl/actctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=60053…
==============================================================================
--- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -1587,7 +1587,7 @@
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
DPRINT1("Exception accessing buffer\n");
- return STATUS_SXS_CANT_GEN_ACTCTX;
+ _SEH2_YIELD(return STATUS_SXS_CANT_GEN_ACTCTX);
}
_SEH2_END;
Modified: trunk/reactos/lib/rtl/sd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sd.c?rev=60053&…
==============================================================================
--- trunk/reactos/lib/rtl/sd.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/sd.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -1062,28 +1062,28 @@
_SEH2_TRY
{
/* Fail on bad revisions */
- if (Sd->Revision != SECURITY_DESCRIPTOR_REVISION) return FALSE;
+ if (Sd->Revision != SECURITY_DESCRIPTOR_REVISION) _SEH2_YIELD(return FALSE);
/* Owner SID must be valid if present */
Owner = SepGetOwnerFromDescriptor(Sd);
- if ((Owner) && (!RtlValidSid(Owner))) return FALSE;
+ if ((Owner) && (!RtlValidSid(Owner))) _SEH2_YIELD(return FALSE);
/* Group SID must be valid if present */
Group = SepGetGroupFromDescriptor(Sd);
- if ((Owner) && (!RtlValidSid(Group))) return FALSE;
+ if ((Owner) && (!RtlValidSid(Group))) _SEH2_YIELD(return FALSE);
/* DACL must be valid if present */
Dacl = SepGetDaclFromDescriptor(Sd);
- if ((Dacl) && (!RtlValidAcl(Dacl))) return FALSE;
+ if ((Dacl) && (!RtlValidAcl(Dacl))) _SEH2_YIELD(return FALSE);
/* SACL must be valid if present */
Sacl = SepGetSaclFromDescriptor(Sd);
- if ((Sacl) && (!RtlValidAcl(Sacl))) return FALSE;
+ if ((Sacl) && (!RtlValidAcl(Sacl))) _SEH2_YIELD(return FALSE);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Access fault, bail out */
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
_SEH2_END;
Modified: trunk/reactos/lib/rtl/sid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sid.c?rev=60053&am…
==============================================================================
--- trunk/reactos/lib/rtl/sid.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/sid.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -32,13 +32,13 @@
(Sid->SubAuthorityCount > SID_MAX_SUB_AUTHORITIES)))
{
/* It's not, fail */
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Access violation, SID is not valid */
- return FALSE;
+ _SEH2_YIELD(return FALSE);
}
_SEH2_END;
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Thu Sep 12 00:41:24 2013
@@ -883,7 +883,7 @@
//
// Return the error
//
- return STATUS_WORKING_SET_QUOTA;
+ _SEH2_YIELD(return STATUS_WORKING_SET_QUOTA);
}
//
@@ -3343,7 +3343,7 @@
//
// Catch illegal base address
//
- if (BaseAddress > MM_HIGHEST_USER_ADDRESS) return
STATUS_INVALID_PARAMETER_2;
+ if (BaseAddress > MM_HIGHEST_USER_ADDRESS) _SEH2_YIELD(return
STATUS_INVALID_PARAMETER_2);
//
// Catch illegal region size
@@ -3353,7 +3353,7 @@
//
// Fail
//
- return STATUS_INVALID_PARAMETER_3;
+ _SEH2_YIELD(return STATUS_INVALID_PARAMETER_3);
}
//
@@ -3370,7 +3370,7 @@
//
// Must have a count
//
- if (CapturedEntryCount == 0) return STATUS_INVALID_PARAMETER_5;
+ if (CapturedEntryCount == 0) _SEH2_YIELD(return STATUS_INVALID_PARAMETER_5);
//
// Can't be larger than the maximum
@@ -3380,7 +3380,7 @@
//
// Fail
//
- return STATUS_INVALID_PARAMETER_5;
+ _SEH2_YIELD(return STATUS_INVALID_PARAMETER_5);
}
//
Modified: trunk/reactos/win32ss/user/user32/windows/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/text.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/text.c [iso-8859-1] Thu Sep 12 00:41:24
2013
@@ -67,7 +67,7 @@
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
SetLastError( ERROR_INVALID_PARAMETER );
- return NULL;
+ _SEH2_YIELD(return NULL);
}
_SEH2_END;
@@ -267,7 +267,7 @@
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
SetLastError( ERROR_INVALID_PARAMETER );
- return NULL;
+ _SEH2_YIELD(return NULL);
}
_SEH2_END;