VirtualBox

Ignore:
Timestamp:
Aug 27, 2021 1:35:33 PM (3 years ago)
Author:
vboxsync
Message:

USB/Validation Kit: Applied the roughly the same fix as for r146541: Make sure to use RTMemReallocZ() instead of just RTMemRealloc(), otherwise the list traversing down below won't find a free slot (NULL check).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp

    r82968 r90957  
    11231123                        {
    11241124                            /* Realloc to accommodate for the new clients. */
    1125                             PUTSCLIENT *papClientsNew = (PUTSCLIENT *)RTMemRealloc(papClients, (cClientsMax + 10) * sizeof(PUTSCLIENT));
     1125                            PUTSCLIENT *papClientsNew = (PUTSCLIENT *)RTMemReallocZ(papClients, cClientsMax * sizeof(PUTSCLIENT), (cClientsMax + 10) * sizeof(PUTSCLIENT));
    11261126                            if (RT_LIKELY(papClientsNew))
    11271127                            {
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