VirtualBox

Changeset 34180 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Nov 18, 2010 3:58:58 PM (14 years ago)
Author:
vboxsync
Message:

build fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/zip/tarvfs.cpp

    r34179 r34180  
    530530                return VERR_TAR_MALFORMED_GNU_LONGXXXX;
    531531
    532             int64_t cch64;
    533             rc = rtZipTarHdrFieldToNum(pHdr->Gnu.size, sizeof(pHdr->Gnu.size), false /*fOctalOnly*/, &cch64);
    534             if (RT_FAILURE(rc) || cch64 < 0 || cch64 > _1M)
     532            int64_t cb64;
     533            rc = rtZipTarHdrFieldToNum(pHdr->Gnu.size, sizeof(pHdr->Gnu.size), false /*fOctalOnly*/, &cb64);
     534            if (RT_FAILURE(rc) || cb64 < 0 || cb64 > _1M)
    535535                return VERR_TAR_MALFORMED_GNU_LONGXXXX;
    536             if (cch64 >= sizeof(pThis->szName))
     536            uint32_t cb = (uint32_t)cb64;
     537            if (cb >= sizeof(pThis->szName))
    537538                return VERR_TAR_NAME_TOO_LONG;
    538539
    539             pThis->cbGnuLongExpect  = (uint32_t)cch64;
     540            pThis->cbGnuLongExpect  = cb;
    540541            pThis->offGnuLongCur    = 0;
    541542            pThis->enmState         = pHdr->Common.typeflag == RTZIPTAR_TF_GNU_LONGNAME
     
    613614            memcpy(pszDst, pHdr->ab, cbIncoming);
    614615
    615             pThis->offGnuLongCur += cbIncoming;
     616            pThis->offGnuLongCur += (uint32_t)cbIncoming;
    616617            if (pThis->offGnuLongCur == pThis->cbGnuLongExpect)
    617618                pThis->enmState = RTZIPTARREADERSTATE_GNU_NEXT;
     
    828829       zero headers at the end.  Afraid it may require further relaxing
    829830       later on, but let's try be strict about things for now. */
    830     return pThis->cZeroHdrs >= (pThis->enmPrevType == RTZIPTARTYPE_POSIX ? 2 : 1);
     831    return pThis->cZeroHdrs >= (pThis->enmPrevType == RTZIPTARTYPE_POSIX ? 2U : 1U);
    831832}
    832833
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