Author: sir_richard
Date: Fri Feb 19 18:54:16 2010
New Revision: 45621
URL:
http://svn.reactos.org/svn/reactos?rev=45621&view=rev
Log:
[NTOS]: Fix an off-by-one-error which incorrectly causes GUI promotion to fail if the
first GUI call is "0", since the limit on the GUI descriptor table will also be
"0". We should check if the limit is equal to or lower, not just if it's
lower.
Thanks to Physicus and Fireball for reporting and working this out. Should fix the
"ArwinSS" problem.
Modified:
trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/traphdlr.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Fri Feb 19 18:54:16 2010
@@ -1401,7 +1401,7 @@
DescriptorTable = (PVOID)((ULONG_PTR)Thread->ServiceTable + Offset);
/* Validate the system call number */
- if (__builtin_expect(Id > DescriptorTable->Limit, 0))
+ if (__builtin_expect(Id >= DescriptorTable->Limit, 0))
{
/* Check if this is a GUI call */
if (__builtin_expect(!(Offset & SERVICE_TABLE_TEST), 0))