VirtualBox

Changeset 59859 in vbox


Ignore:
Timestamp:
Feb 26, 2016 6:00:42 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
105758
Message:

gcc asan fix (don't call memcpy with a NULL parameter even if cb=0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r59775 r59859  
    663663        uint32_t cbSrc_ = cbSrc; \
    664664        uint32_t cbCopy = RT_MIN(cbLeft, cbSrc_); \
    665         memcpy(pbBuf, pvSrc, cbCopy); \
     665        if (cbCopy) \
     666            memcpy(pbBuf, pvSrc, cbCopy); \
    666667        cbLeft -= cbCopy; \
    667668        if (!cbLeft) \
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