VirtualBox

Changeset 65550 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Jan 31, 2017 4:26:34 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113197
Message:

Main/MachineDebuggerImpl: don't call memcpy with size=0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp

    r65120 r65550  
    879879     * Copy the bytes into the buffer and terminate it.
    880880     */
    881     memcpy(&pHlp->pszBuf[pHlp->offBuf], pachChars, cbChars);
    882     pHlp->offBuf += cbChars;
     881    if (cbChars)
     882    {
     883        memcpy(&pHlp->pszBuf[pHlp->offBuf], pachChars, cbChars);
     884        pHlp->offBuf += cbChars;
     885    }
    883886    pHlp->pszBuf[pHlp->offBuf] = '\0';
    884887    Assert(pHlp->offBuf < pHlp->cbBuf);
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