Changeset 60553 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Apr 18, 2016 6:09:55 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106682
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r60026 r60553 1725 1725 break; 1726 1726 } 1727 case BUSLOGICCOMMAND_SET_SCSI_SELECTION_TIMEOUT: 1728 { 1729 /* no-op */ 1730 pBusLogic->cbReplyParametersLeft = 0; 1731 break; 1732 } 1727 1733 case BUSLOGICCOMMAND_MODIFY_IO_ADDRESS: 1728 1734 { … … 1816 1822 /* The reply length is set by the guest and is found in the first byte of the command buffer. */ 1817 1823 pBusLogic->cbReplyParametersLeft = pBusLogic->aCommandBuffer[0]; 1818 memset(pBusLogic->aReplyBuffer, ' ', pBusLogic->cbReplyParametersLeft);1819 const char aModelName[] = "958"; 1820 int cCharsToTransfer = (pBusLogic->cbReplyParametersLeft <= (sizeof(aModelName) - 1))1824 memset(pBusLogic->aReplyBuffer, 0, pBusLogic->cbReplyParametersLeft); 1825 const char aModelName[] = "958"; /* Trailing \0 is fine, that's the filler anyway. */ 1826 int cCharsToTransfer = pBusLogic->cbReplyParametersLeft <= sizeof(aModelName) 1821 1827 ? pBusLogic->cbReplyParametersLeft 1822 : sizeof(aModelName) - 1;1828 : sizeof(aModelName); 1823 1829 1824 1830 for (int i = 0; i < cCharsToTransfer; i++) … … 2312 2318 case BUSLOGICCOMMAND_WRITE_BUSMASTER_CHIP_FIFO: 2313 2319 pBusLogic->cbCommandParametersLeft = 3; 2320 break; 2321 case BUSLOGICCOMMAND_SET_SCSI_SELECTION_TIMEOUT: 2322 pBusLogic->cbCommandParametersLeft = 4; 2314 2323 break; 2315 2324 case BUSLOGICCOMMAND_INITIALIZE_MAILBOX:
Note:
See TracChangeset
for help on using the changeset viewer.