Changeset 34180 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Nov 18, 2010 3:58:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/zip/tarvfs.cpp
r34179 r34180 530 530 return VERR_TAR_MALFORMED_GNU_LONGXXXX; 531 531 532 int64_t c ch64;533 rc = rtZipTarHdrFieldToNum(pHdr->Gnu.size, sizeof(pHdr->Gnu.size), false /*fOctalOnly*/, &c ch64);534 if (RT_FAILURE(rc) || c ch64 < 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) 535 535 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)) 537 538 return VERR_TAR_NAME_TOO_LONG; 538 539 539 pThis->cbGnuLongExpect = (uint32_t)cch64;540 pThis->cbGnuLongExpect = cb; 540 541 pThis->offGnuLongCur = 0; 541 542 pThis->enmState = pHdr->Common.typeflag == RTZIPTAR_TF_GNU_LONGNAME … … 613 614 memcpy(pszDst, pHdr->ab, cbIncoming); 614 615 615 pThis->offGnuLongCur += cbIncoming;616 pThis->offGnuLongCur += (uint32_t)cbIncoming; 616 617 if (pThis->offGnuLongCur == pThis->cbGnuLongExpect) 617 618 pThis->enmState = RTZIPTARREADERSTATE_GNU_NEXT; … … 828 829 zero headers at the end. Afraid it may require further relaxing 829 830 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); 831 832 } 832 833
Note:
See TracChangeset
for help on using the changeset viewer.