Author: sir_richard
Date: Wed Jan 13 23:06:48 2010
New Revision: 45065
URL:
http://svn.reactos.org/svn/reactos?rev=45065&view=rev
Log:
[NTOS]: Fix bug in illegal instruction trap handling. Patch by Timo Kreuzer
<physicus(a)reactos.org>rg>.
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] Wed Jan 13 23:06:48 2010
@@ -1084,19 +1084,23 @@
/* Skip prefix instructions */
for (j = 0; j < sizeof(KiTrapPrefixTable); j++)
{
- /* Is this NOT a prefix instruction? */
- if (Instructions[i] != KiTrapPrefixTable[j])
+ /* Is this a prefix instruction? */
+ if (Instructions[i] == KiTrapPrefixTable[j])
{
- /* We can go ahead and handle the fault now */
- Instruction = Instructions[i];
+ /* Stop looking */
break;
}
}
- /* Do we need to keep looking? */
- if (Instruction) break;
+ /* Is this NOT any prefix instruction? */
+ if (Instructions[i] != KiTrapPrefixTable[j])
+ {
+ /* We can go ahead and handle the fault now */
+ Instruction = Instructions[i];
+ break;
+ }
}
-
+
/* If all we found was prefixes, then this instruction is too long */
if (!Instruction)
{