Changeset 100518 in vbox for trunk/src/VBox
- Timestamp:
- Jul 11, 2023 2:56:03 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/VUSBUrb.cpp
r99739 r100518 678 678 } 679 679 680 /* Paranoia: Clear data memory that was previously used 681 * by the guest. See @bugref{10438}. 682 */ 683 PVUSBSETUP pOldSetup = pExtra->pMsg; 684 uint32_t cbClean = sizeof(VUSBSETUP) + pOldSetup->wLength; 685 cbClean = RT_MIN(cbClean, pExtra->cbMax); 686 memset(pExtra->Urb.abData, 0, cbClean); 687 680 688 /* 681 689 * Check if we've got an cancelled message URB. Allocate a new one in that case. … … 705 713 { 706 714 uint32_t cbReq = RT_ALIGN_32(cbBuf + pSetupIn->wLength, 64); 707 PVUSBCTRLEXTRA pNew = (PVUSBCTRLEXTRA)RTMemRealloc(pExtra, RT_UOFFSETOF_DYN(VUSBCTRLEXTRA, Urb.abData[cbReq])); 715 PVUSBCTRLEXTRA pNew = (PVUSBCTRLEXTRA)RTMemReallocZ(pExtra, 716 RT_UOFFSETOF_DYN(VUSBCTRLEXTRA, Urb.abData[pExtra->cbMax]), 717 RT_UOFFSETOF_DYN(VUSBCTRLEXTRA, Urb.abData[cbReq])); 708 718 if (!pNew) 709 719 {
Note:
See TracChangeset
for help on using the changeset viewer.