VirtualBox

Changeset 75169 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Oct 30, 2018 6:29:31 AM (6 years ago)
Author:
vboxsync
Message:

Net/Win: bugref:9280 bugref:9233 Changed back the order of offset/truncate handling.

Location:
trunk/src/VBox/HostDrivers
Files:
2 edited

Legend:

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

    r75122 r75169  
    526526        }
    527527
    528         if (cbSrc > cbPacket)
    529             cbSrc = cbPacket;
    530 
     528        /* Handle the offset in the current (which is the first for us) MDL */
    531529        if (uOffset)
    532530        {
     
    539537            else
    540538            {
    541                 uOffset -= cbSrc;
    542                 continue;
     539                /* This is an invalid MDL chain */
     540                vboxNetAdpWinDestroySG(pSG);
     541                return NULL;
    543542            }
    544543        }
     544
     545        /* Do not read the last MDL beyond packet's end */
     546        if (cbSrc > cbPacket)
     547            cbSrc = cbPacket;
    545548
    546549        Assert(cSegs < pSG->cSegsAlloc);
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp

    r75122 r75169  
    16331633        }
    16341634
    1635         if (cbSrc > cbPacket)
    1636             cbSrc = cbPacket;
    1637 
     1635        /* Handle the offset in the current (which is the first for us) MDL */
    16381636        if (uOffset)
    16391637        {
     
    16461644            else
    16471645            {
    1648                 uOffset -= cbSrc;
    1649                 continue;
     1646                /* This is an invalid MDL chain */
     1647                vboxNetLwfWinDestroySG(pSG);
     1648                return NULL;
    16501649            }
    16511650        }
     1651
     1652        /* Do not read the last MDL beyond packet's end */
     1653        if (cbSrc > cbPacket)
     1654            cbSrc = cbPacket;
    16521655
    16531656        Assert(cSegs < pSG->cSegsAlloc);
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