VirtualBox

Changeset 26029 in vbox


Ignore:
Timestamp:
Jan 25, 2010 6:05:32 PM (15 years ago)
Author:
vboxsync
Message:

#4610: virtio-net: fixed handling for port writes beyond the valid range.

File:
1 edited

Legend:

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

    r26001 r26029  
    346346    {
    347347        Log(("%s vnetGetConfig: Write beyond the config structure is attempted (port=%RTiop cb=%x).\n", INSTANCE(pState), port, cb));
    348         return VERR_INTERNAL_ERROR;
     348        if (port < sizeof(struct VNetPCIConfig))
     349            memcpy(((uint8_t*)&pState->config) + port, data,
     350                   sizeof(struct VNetPCIConfig) - port);
     351        return VINF_SUCCESS;
    349352    }
    350353    memcpy(((uint8_t*)&pState->config) + port, data, cb);
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