VirtualBox

Changeset 33105 in vbox for trunk/src


Ignore:
Timestamp:
Oct 13, 2010 12:52:58 PM (14 years ago)
Author:
vboxsync
Message:

Corrected assertion (and comments).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VBoxSCSI.cpp

    r33099 r33105  
    373373    uint32_t cbTransfer = *pcTransfer * cb;
    374374
    375     /* Read string only valid for data in register. */
    376     AssertMsg(iRegister == 1, ("Hey only register 1 can be read from with string\n"));
    377     AssertMsg(cbTransfer == 512, ("Only 512 byte transfers are allowed\n"));
    378 
     375    /* Write string only valid for data in/out register. */
     376    AssertMsg(iRegister == 1, ("Hey only register 1 can be written to with string\n"));
     377    Assert(cbTransfer == pVBoxSCSI->cbBuf);
     378    if (cbTransfer > pVBoxSCSI->cbBuf)
     379        cbTransfer = pVBoxSCSI->cbBuf;  /* Ignore excess data (not supposed to happen). */
    379380
    380381    int rc = PDMDevHlpPhysReadGCVirt(pDevIns, pVBoxSCSI->pBuf, GCSrc, cbTransfer);
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