VirtualBox

Changeset 103685 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Mar 5, 2024 3:46:54 PM (11 months ago)
Author:
vboxsync
Message:

Backed out r161312 (no longer needed): iprt: Prevent array-index-out-of-bounds UBSAN warnings on Linux, bugref:10585.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r103684 r103685  
    439439            fContiguous = true;
    440440            for (iPage = 0; iPage < cPages; iPage++)
    441                 *(pMemLnx->apPages + iPage) = &paPages[iPage];
     441                pMemLnx->apPages[iPage] = &paPages[iPage];
    442442        }
    443443        else if (fContiguous)
     
    455455        for (iPage = 0; iPage < cPages; iPage++)
    456456        {
    457             *(pMemLnx->apPages + iPage) = alloc_page(fFlagsLnx | __GFP_NOWARN);
    458             if (RT_UNLIKELY(!*(pMemLnx->apPages + iPage)))
     457            pMemLnx->apPages[iPage] = alloc_page(fFlagsLnx | __GFP_NOWARN);
     458            if (RT_UNLIKELY(!pMemLnx->apPages[iPage]))
    459459            {
    460460                while (iPage-- > 0)
    461                     __free_page(*(pMemLnx->apPages + iPage));
     461                    __free_page(pMemLnx->apPages[iPage]);
    462462                rtR0MemObjDelete(&pMemLnx->Core);
    463463                return rcNoMem;
     
    636636        size_t iPage = pMemLnx->cPages;
    637637        while (iPage-- > 0)
    638             if (PageHighMem(*(pMemLnx->apPages + iPage)))
     638            if (PageHighMem(pMemLnx->apPages[iPage]))
    639639            {
    640640                fMustMap = true;
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