VirtualBox

Changeset 90905 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Aug 26, 2021 9:49:19 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146541
Message:

Audio/ATS: Make sure to use RTMemReallocZ() instead of just RTMemRealloc(), otherwise the list traversing down below won't find a free slot (NULL check). bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioTestService.cpp

    r90868 r90905  
    888888                        {
    889889                            /* Realloc to accommodate for the new clients. */
    890                             PATSCLIENTINST *papInstsNew = (PATSCLIENTINST *)RTMemRealloc(papInsts, (cClientsMax + 10) * sizeof(PATSCLIENTINST));
     890                            PATSCLIENTINST *papInstsNew = (PATSCLIENTINST *)RTMemReallocZ(papInsts, cClientsMax * sizeof(PATSCLIENTINST), (cClientsMax + 10) * sizeof(PATSCLIENTINST));
    891891                            if (RT_LIKELY(papInstsNew))
    892892                            {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette