VirtualBox

Changeset 36826 in vbox


Ignore:
Timestamp:
Apr 23, 2011 11:12:54 PM (14 years ago)
Author:
vboxsync
Message:

DBGFReg.cpp: Fixed buffer overflow bug caused by using the wrong variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp

    r35625 r36826  
    22162216    if (cbToCopy > 0)
    22172217    {
    2218         memcpy(&pArgs->pszBuf[pArgs->offBuf], pachChars, cbChars);
    2219         pArgs->offBuf     += cbChars;
    2220         pArgs->cchLeftBuf -= cbChars;
     2218        memcpy(&pArgs->pszBuf[pArgs->offBuf], pachChars, cbToCopy);
     2219        pArgs->offBuf     += cbToCopy;
     2220        pArgs->cchLeftBuf -= cbToCopy;
    22212221        pArgs->pszBuf[pArgs->offBuf] = '\0';
    22222222    }
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