VirtualBox

Changeset 108372 in vbox


Ignore:
Timestamp:
Feb 25, 2025 2:10:56 PM (8 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167733
Message:

UsbNet: Small change to handle null pointers properly bugref:10779

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/UsbNet.cpp

    r108371 r108372  
    17121712                PPDMSCATTERGATHER pSgBuf;
    17131713                rc = pThis->Lun0.pINetwork->pfnAllocBuf(pThis->Lun0.pINetwork, pDGram->wDatagramLength, NULL /*pGso*/, &pSgBuf);
    1714                 if (RT_SUCCESS(rc))
     1714                if (RT_SUCCESS(rc) && pSgBuf)
    17151715                {
    1716                     uint8_t *pbBuf = pSgBuf ? (uint8_t *)pSgBuf->aSegs[0].pvSeg : NULL;
     1716                    uint8_t *pbBuf = (uint8_t *)pSgBuf->aSegs[0].pvSeg;
    17171717                    memcpy(pbBuf, &pUrb->abData[pDGram->wDatagramIndex], pDGram->wDatagramLength);
    17181718                    usbNetPacketDump(pThis, pbBuf, pDGram->wDatagramLength, "--> Tx");
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette