VirtualBox

Changeset 88643 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Apr 22, 2021 7:57:03 AM (4 years ago)
Author:
vboxsync
Message:

Devices/Storage/DevLsiLogicSCSI: Fix crashing on NULL pointer dereference during device construction when the SAS variant is used (regression from r143802), bugref:9914

Location:
trunk/src/VBox/Devices/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r88530 r88643  
    36783678    LogFlowFunc(("pThis=%#p\n", pThis));
    36793679
    3680     /* Clear everything first. */
    36813680    AssertPtrReturnVoid(pThisCC->pConfigurationPages);
    36823681    PMptConfigurationPagesSupported pPages = pThisCC->pConfigurationPages;
    3683     memset(pPages, 0, sizeof(MptConfigurationPagesSupported));
    36843682
    36853683    /* Manufacturing Page 0. */
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.h

    r82968 r88643  
    33273327
    33283328#define MPT_CONFIG_PAGE_HEADER_INIT_MANUFACTURING(pg, type, nr, flags) \
     3329    RT_ZERO(*pg); \
    33293330    MPT_CONFIG_PAGE_HEADER_INIT(pg, type, nr, flags | MPT_CONFIGURATION_PAGE_TYPE_MANUFACTURING)
    33303331
    33313332#define MPT_CONFIG_PAGE_HEADER_INIT_IO_UNIT(pg, type, nr, flags) \
     3333    RT_ZERO(*pg); \
    33323334    MPT_CONFIG_PAGE_HEADER_INIT(pg, type, nr, flags | MPT_CONFIGURATION_PAGE_TYPE_IO_UNIT)
    33333335
    33343336#define MPT_CONFIG_PAGE_HEADER_INIT_IOC(pg, type, nr, flags) \
     3337    RT_ZERO(*pg); \
    33353338    MPT_CONFIG_PAGE_HEADER_INIT(pg, type, nr, flags | MPT_CONFIGURATION_PAGE_TYPE_IOC)
    33363339
    33373340#define MPT_CONFIG_PAGE_HEADER_INIT_BIOS(pg, type, nr, flags) \
     3341    RT_ZERO(*pg); \
    33383342    MPT_CONFIG_PAGE_HEADER_INIT(pg, type, nr, flags | MPT_CONFIGURATION_PAGE_TYPE_BIOS)
    33393343
     
    33423346 */
    33433347#define MPT_CONFIG_EXTENDED_PAGE_HEADER_INIT(pg, cb, nr, flags, exttype) \
     3348    RT_BZERO(pg, cb); \
    33443349    (pg)->u.fields.ExtHeader.u8PageType   = (flags) | MPT_CONFIGURATION_PAGE_TYPE_EXTENDED; \
    33453350    (pg)->u.fields.ExtHeader.u8PageNumber = (nr); \
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