VirtualBox

Changeset 78477 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 13, 2019 8:58:51 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130512
Message:

PCnet: Do not access the 'user' dword of RX/TX descriptors.

File:
1 edited

Legend:

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

    r78461 r78477  
    816816    {
    817817        ((uint32_t*)tmd)[1] |=  0x80000000;
    818         pcnetPhysWrite(pThis, addr, (void*)tmd, 16);
     818        pcnetPhysWrite(pThis, addr, (void*)tmd, 12);
    819819        ((uint32_t*)tmd)[1] &= ~0x80000000;
    820820        pcnetPhysWrite(pThis, addr+7, (uint8_t*)tmd + 7, 1);
     
    822822    else
    823823    {
    824         uint32_t xda[4];
     824        uint32_t xda[3];
    825825        xda[0] = ((uint32_t *)tmd)[2];
    826826        xda[1] = ((uint32_t *)tmd)[1];
    827827        xda[2] = ((uint32_t *)tmd)[0];
    828         xda[3] = ((uint32_t *)tmd)[3];
    829828        xda[1] |=  0x80000000;
    830829        pcnetPhysWrite(pThis, addr, (void*)&xda[0], sizeof(xda));
     
    913912    {
    914913        ((uint32_t*)rmd)[1] |=  0x80000000;
    915         pcnetPhysWrite(pThis, addr, (void*)rmd, 16);
     914        pcnetPhysWrite(pThis, addr, (void*)rmd, 12);
    916915        ((uint32_t*)rmd)[1] &= ~0x80000000;
    917916        pcnetPhysWrite(pThis, addr+7, (uint8_t*)rmd + 7, 1);
     
    919918    else
    920919    {
    921         uint32_t rda[4];
     920        uint32_t rda[3];
    922921        rda[0] = ((uint32_t *)rmd)[2];
    923922        rda[1] = ((uint32_t *)rmd)[1];
    924923        rda[2] = ((uint32_t *)rmd)[0];
    925         rda[3] = ((uint32_t *)rmd)[3];
    926924        rda[1] |=  0x80000000;
    927925        pcnetPhysWrite(pThis, addr, (void*)&rda[0], sizeof(rda));
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