VirtualBox

Ignore:
Timestamp:
Apr 4, 2024 3:35:39 PM (10 months ago)
Author:
vboxsync
Message:

VBoxNetFlt: Fix UBSAN warnings by switching to flexible arrays, bugref:10585.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp

    r98103 r104159  
    11421142     * 2. buffer of cbPacket containing the entire packet */
    11431143    AssertCompileSizeAlignment(INTNETSG, sizeof(PVOID));
    1144     Status = vboxNetFltWinMemAlloc((PVOID*)&pSG, cbPacket + sizeof(INTNETSG));
     1144    Status = vboxNetFltWinMemAlloc((PVOID*)&pSG, cbPacket + RT_UOFFSETOF_DYN(INTNETSG, aSegs[1]));
    11451145    if (Status == NDIS_STATUS_SUCCESS)
    11461146    {
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