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/Runtime/r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp

    r70292 r73097  
    357357     */
    358358    uint32_t                cModules = pModInfo ? 110 /*32KB*/ : 27 /*8KB*/;
    359     ULONG                   cbInfo   = RT_OFFSETOF(RTL_PROCESS_MODULES, Modules[cModules]);
     359    ULONG                   cbInfo   = RT_UOFFSETOF_DYN(RTL_PROCESS_MODULES, Modules[cModules]);
    360360    PRTL_PROCESS_MODULES    pInfo    = (PRTL_PROCESS_MODULES)RTMemAllocZ(cbInfo);
    361361    if (!pInfo)
    362362    {
    363363        cModules = cModules / 4;
    364         cbInfo   = RT_OFFSETOF(RTL_PROCESS_MODULES, Modules[cModules]);
     364        cbInfo   = RT_UOFFSETOF_DYN(RTL_PROCESS_MODULES, Modules[cModules]);
    365365        pInfo    = (PRTL_PROCESS_MODULES)RTMemAllocZ(cbInfo);
    366366        if (!pInfo)
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