Author: aandrejevic Date: Mon Sep 30 03:10:38 2013 New Revision: 60468
URL: http://svn.reactos.org/svn/reactos?rev=60468&view=rev Log: [SOFT386] Fix previous fix.
Modified: branches/ntvdm/lib/soft386/common.c
Modified: branches/ntvdm/lib/soft386/common.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.c?rev=6... ============================================================================== --- branches/ntvdm/lib/soft386/common.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/common.c [iso-8859-1] Mon Sep 30 03:10:38 2013 @@ -50,7 +50,7 @@ /* Get the cached descriptor */ CachedDescriptor = &State->SegmentRegs[SegmentReg];
- if ((Offset + Size) > CachedDescriptor->Limit) + if ((Offset + Size - 1) > CachedDescriptor->Limit) { /* Read beyond limit */ Soft386Exception(State, SOFT386_EXCEPTION_GP); @@ -190,7 +190,7 @@ /* Get the cached descriptor */ CachedDescriptor = &State->SegmentRegs[SegmentReg];
- if ((Offset + Size) >= CachedDescriptor->Limit) + if ((Offset + Size - 1) > CachedDescriptor->Limit) { /* Write beyond limit */ Soft386Exception(State, SOFT386_EXCEPTION_GP);