VirtualBox

Changeset 39791 in vbox


Ignore:
Timestamp:
Jan 18, 2012 10:50:49 AM (13 years ago)
Author:
vboxsync
Message:

GuestCtrlIO: Fixed parsing result to be VERR_MORE_DATA when entering a new *and* incomplete stream block.

File:
1 edited

Legend:

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

    r39418 r39791  
    355355    int rc = VINF_SUCCESS;
    356356
    357     char *pszOff   = (char*)&m_pbBuffer[m_cbOffset];
    358     char *pszStart = pszOff;
     357    char    *pszOff    = (char*)&m_pbBuffer[m_cbOffset];
     358    char    *pszStart  = pszOff;
     359    uint32_t uDistance;
    359360    while (*pszStart)
    360361    {
    361362        size_t pairLen = strlen(pszStart);
    362         if ((pszStart - pszOff) + pairLen + 1 >= m_cbSize)
     363        uDistance = (pszStart - pszOff);
     364        if (m_cbOffset + uDistance + pairLen + 1 >= m_cbSize)
    363365        {
    364366            rc = VERR_MORE_DATA;
     
    393395     * in our buffer just skip the current termination so that
    394396     * we can try next time. */
    395     uint32_t uDistance = (pszStart - pszOff);
     397    uDistance = (pszStart - pszOff);
    396398    if (   !uDistance
    397399        && *pszStart == '\0'
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