Author: aandrejevic
Date: Sat Sep 28 03:15:48 2013
New Revision: 60399
URL:
http://svn.reactos.org/svn/reactos?rev=60399&view=rev
Log:
[SOFT386]
Disallow direct writing to CS. Changing CS must be done with a far jump.
Modified:
branches/ntvdm/lib/soft386/opcodes.c
Modified: branches/ntvdm/lib/soft386/opcodes.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
==============================================================================
--- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Sat Sep 28 03:15:48 2013
@@ -4210,7 +4210,8 @@
return FALSE;
}
- if (ModRegRm.Register >= SOFT386_NUM_SEG_REGS)
+ if ((ModRegRm.Register >= SOFT386_NUM_SEG_REGS)
+ || ((SOFT386_SEG_REGS)ModRegRm.Register == SOFT386_REG_CS))
{
/* Invalid */
Soft386Exception(State, SOFT386_EXCEPTION_UD);