VirtualBox

Changeset 71776 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 9, 2018 2:58:05 PM (7 years ago)
Author:
vboxsync
Message:

DevSmc: assert on I/O port registration sanity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/DevSmc.cpp

    r69500 r71776  
    12881288    PDEVSMC pThis = PDMINS_2_DATA(pDevIns, PDEVSMC);
    12891289    uint32_t uReg = Port - SMC_PORT_FIRST;
     1290    AssertReturn(uReg < RT_ELEMENTS(g_aSmcRegs), VERR_INTERNAL_ERROR_3); /* impossible*/
    12901291    int rc = g_aSmcRegs[uReg].pfnWrite(pThis, uReg, u32);
    12911292
     
    13311332     */
    13321333    uint32_t uReg = Port - SMC_PORT_FIRST;
     1334    AssertReturn(uReg < RT_ELEMENTS(g_aSmcRegs), VERR_INTERNAL_ERROR_3); /* impossible*/
    13331335    Log2(("smcIoPortRead: %#04x read access: LB %u\n", uReg, cb));
    13341336    uint8_t bValue = 0xff;
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