VirtualBox

Changeset 82368 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Dec 4, 2019 9:47:53 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135199
Message:

Dev/E1000: Another trivial issue detected by parfait.

File:
1 edited

Legend:

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

    r82364 r82368  
    45354535    {
    45364536        /* Calculate how many bytes we have left in this TCP segment */
    4537         uint32_t cb = u16MaxPktLen - pThis->u16TxPktLen;
     4537        uint16_t cb = u16MaxPktLen - pThis->u16TxPktLen;
    45384538        if (cb > pDesc->data.cmd.u20DTALEN)
    45394539        {
    45404540            /* This descriptor fits completely into current segment */
    4541             cb = pDesc->data.cmd.u20DTALEN;
     4541            cb = (uint16_t)pDesc->data.cmd.u20DTALEN; /* u20DTALEN at this point is guarantied to fit into 16 bits. */
    45424542            rc = e1kFallbackAddSegment(pDevIns, pThis, pDesc->data.u64BufAddr, cb, pDesc->data.cmd.fEOP /*fSend*/, fOnWorkerThread);
    45434543        }
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