Changeset 4198 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 17, 2007 12:45:19 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/DBGFAddr.cpp
r4071 r4198 63 63 if (VBOX_FAILURE(rc)) 64 64 return rc; 65 if (off > SelInfo.cbLimit) 65 66 /* check limit. */ 67 if ( (SelInfo.Raw.Gen.u4Type & X86_SEL_TYPE_DOWN) 68 && SelInfo.Raw.Gen.u1DescType 69 && ( SelInfo.Raw.Gen.u4Type == X86_SEL_TYPE_RO_DOWN 70 || SelInfo.Raw.Gen.u4Type == X86_SEL_TYPE_RO_DOWN_ACC 71 || SelInfo.Raw.Gen.u4Type == X86_SEL_TYPE_RW_DOWN 72 || SelInfo.Raw.Gen.u4Type == X86_SEL_TYPE_RW_DOWN_ACC)) 73 { 74 if (!SelInfo.Raw.Gen.u1Granularity && off > UINT32_C(0xffff)) 75 return VERR_OUT_OF_SELECTOR_BOUNDS; 76 if (off <= SelInfo.cbLimit) 77 return VERR_OUT_OF_SELECTOR_BOUNDS; 78 } 79 else if (off > SelInfo.cbLimit) 66 80 return VERR_OUT_OF_SELECTOR_BOUNDS; 81 67 82 pAddress->FlatPtr = SelInfo.GCPtrBase + off; 68 83 /** @todo fix this flat selector test! */ … … 71 86 && SelInfo.Raw.Gen.u1DefBig) 72 87 pAddress->fFlags = DBGFADDRESS_FLAGS_FLAT; 73 else if (SelInfo.cbLimit <= 0xffff)88 else if (SelInfo.cbLimit <= UINT32_C(0xffff)) 74 89 pAddress->fFlags = DBGFADDRESS_FLAGS_FAR16; 75 else if (SelInfo.cbLimit <= 0xffffffff)90 else if (SelInfo.cbLimit <= UINT32_C(0xffffffff)) 76 91 pAddress->fFlags = DBGFADDRESS_FLAGS_FAR32; 77 92 else
Note:
See TracChangeset
for help on using the changeset viewer.