VirtualBox

Changeset 85549 in vbox


Ignore:
Timestamp:
Jul 30, 2020 9:59:46 AM (4 years ago)
Author:
vboxsync
Message:

DnD/Main: Use PAGE_SIZE for meta data block alignment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestDnDPrivate.h

    r85537 r85549  
    159159            return VINF_SUCCESS;
    160160
     161        cbSize = RT_ALIGN_Z(cbSize, PAGE_SIZE);
     162
    161163        if (cbSize > _32M) /* Meta data can be up to 32MB. */
    162164            return VERR_BUFFER_OVERFLOW;
     
    166168        {
    167169            Assert(cbData == 0);
    168             pvTmp = RTMemAllocZ(RT_ALIGN_Z(cbSize, 4096));
     170            pvTmp = RTMemAllocZ(cbSize);
    169171        }
    170172        else
    171173        {
    172174            AssertPtr(pvData);
    173             pvTmp = RTMemRealloc(pvData, RT_ALIGN_Z(cbSize, 4096));
    174             RT_BZERO(pvTmp, cbSize);
     175            pvTmp = RTMemRealloc(pvData, cbSize);
    175176        }
    176177
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