VirtualBox

Ignore:
Timestamp:
Jul 12, 2018 9:06:33 PM (6 years ago)
Author:
vboxsync
Message:

*: Made RT_UOFFSETOF, RT_OFFSETOF, RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD work like builtin_offsetof() and require compile time resolvable requests, adding RT_UOFFSETOF_DYN for the dynamic questions that can only be answered at runtime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp

    r69500 r73097  
    861861                    uint32_t cbName        = (uint32_t)strlen(uBuf.szName) + 1;
    862862                    uint32_t cbNameAligned = RT_ALIGN_32(cbName, sizeof(RTUTF16));
    863                     uint32_t cbNeeded      = RT_OFFSETOF(VERIFIERCACHEIMPORT, szName[cbNameAligned])
     863                    uint32_t cbNeeded      = RT_UOFFSETOF_DYN(VERIFIERCACHEIMPORT, szName[cbNameAligned])
    864864                                           + (pawcDir ? (cwcDir + 1) * sizeof(RTUTF16) : 0);
    865865                    PVERIFIERCACHEIMPORT pImport = (PVERIFIERCACHEIMPORT)RTMemAllocZ(cbNeeded);
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