Writing to read-only data selector now causes a fault.

This commit is contained in:
TomW 2015-06-21 14:54:58 +01:00
commit b5a498683a
3 changed files with 12 additions and 10 deletions

View file

@ -44,7 +44,7 @@ extern uint16_t ea_rseg;
}
#define CHECK_WRITE(seg, low, high) \
if ((low < (seg)->limit_low) || (high > (seg)->limit_high)) \
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || !((seg)->access & 2)) \
{ \
x86gpf("Limit check", 0); \
return 1; \