Changeset 85103 in vbox
- Timestamp:
- Jul 8, 2020 8:39:21 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r84504 r85103 1318 1318 MbxIn.u.in.uHostAdapterStatus = uHostAdapterStatus; 1319 1319 MbxIn.u.in.uTargetDeviceStatus = uDeviceStatus; 1320 MbxIn.u.in.uReserved = 0; 1320 1321 MbxIn.u.in.uCompletionCode = uMailboxCompletionCode; 1321 1322 … … 2435 2436 case BUSLOGIC_REGISTER_DATAIN: 2436 2437 { 2438 AssertCompileSize(pThis->LocalRam, 256); 2439 AssertCompileSize(pThis->iReply, sizeof(uint8_t)); 2440 AssertCompileSize(pThis->cbReplyParametersLeft, sizeof(uint8_t)); 2441 2437 2442 if (pThis->fUseLocalRam) 2438 2443 *pu32 = pThis->LocalRam.u8View[pThis->iReply]; 2439 2444 else 2440 *pu32 = pThis->aReplyBuffer[pThis->iReply]; 2445 { 2446 /* 2447 * Real adapters seem to pad the reply with zeroes and allow up to 255 bytes even 2448 * if the real reply is shorter. 2449 */ 2450 if (pThis->iReply >= sizeof(pThis->aReplyBuffer)) 2451 *pu32 = 0; 2452 else 2453 *pu32 = pThis->aReplyBuffer[pThis->iReply]; 2454 } 2441 2455 2442 2456 /* Careful about underflow - guest can read data register even if
Note:
See TracChangeset
for help on using the changeset viewer.

