VirtualBox

Changeset 2009 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 10, 2007 2:19:40 PM (18 years ago)
Author:
vboxsync
Message:

Fixed segment limit calculation for expand-down segments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/SELMAll.cpp

    r1443 r2009  
    237237                }
    238238                /* check limit. */
    239                 /** @todo check the manual on this!!! */
    240                 if ((RTGCUINTPTR)(Desc.Gen.u1Granularity ? 0xffffffff : 0xfffff) - (RTGCUINTPTR)Addr > u32Limit)
     239                if (!Desc.Gen.u1Granularity && (RTGCUINTPTR)Addr > (RTGCUINTPTR)0xffff)
     240                    return VERR_OUT_OF_SELECTOR_BOUNDS;
     241                if ((RTGCUINTPTR)Addr <= u32Limit)
    241242                    return VERR_OUT_OF_SELECTOR_BOUNDS;
    242243
     
    245246                    *ppvGC = pvFlat;
    246247                if (pcb)
    247                     *pcb = (Desc.Gen.u1Granularity ? 0xffffffff : 0xfffff) - (RTGCUINTPTR)Addr + 1;
     248                    *pcb = (Desc.Gen.u1Granularity ? 0xffffffff : 0xffff) - (RTGCUINTPTR)Addr + 1;
    248249                return VINF_SUCCESS;
    249250
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette