VirtualBox

Changeset 42416 in vbox


Ignore:
Timestamp:
Jul 26, 2012 4:00:23 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79516
Message:

VGA: Better range checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r42360 r42416  
    30663066    } else if (pThis->gr[5] & 0x10) {
    30673067        /* odd/even mode (aka text mode mapping) */
    3068         VERIFY_VRAM_WRITE_OFF_RETURN(pThis, GCPhysAddr * 2 + cItems * cbItem - 1);
     3068        VERIFY_VRAM_WRITE_OFF_RETURN(pThis, (GCPhysAddr + cItems * cbItem) * 4 - 1);
    30693069        while (cItems-- > 0)
    30703070            for (i = 0; i < cbItem; i++)
     
    30803080    } else {
    30813081        /* standard VGA latched access */
    3082         VERIFY_VRAM_WRITE_OFF_RETURN(pThis, GCPhysAddr + cItems * cbItem - 1);
     3082        VERIFY_VRAM_WRITE_OFF_RETURN(pThis, (GCPhysAddr + cItems * cbItem) * 4 - 1);
    30833083
    30843084        switch(pThis->gr[5] & 3) {
Note: See TracChangeset for help on using the changeset viewer.

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