Lines Matching refs:pXarHdr

1794  * @param   pXarHdr     The XAR header.
1797 static int rtZipXarValidateTocPart2(PRTZIPXARFSSTREAM pThis, PCXARHEADER pXarHdr, PCRTZIPXARHASHDIGEST pTocDigest)
1863 * @param pXarHdr The XAR header.
1869 static int rtZipXarReadAndValidateToc(RTVFSIOSTREAM hVfsIosIn, PCXARHEADER pXarHdr,
1875 char *pszOutput = (char *)RTMemTmpAlloc(pXarHdr->cbTocUncompressed + 1);
1879 void *pvInput = RTMemTmpAlloc(pXarHdr->cbTocCompressed);
1882 rc = RTVfsIoStrmRead(hVfsIosIn, pvInput, pXarHdr->cbTocCompressed, true /*fBlocking*/, NULL);
1885 rtZipXarCalcHash(pXarHdr->uHashFunction, pvInput, pXarHdr->cbTocCompressed, pTocDigest);
1889 pvInput, pXarHdr->cbTocCompressed, NULL,
1890 pszOutput, pXarHdr->cbTocUncompressed, &cbActual);
1891 if (RT_SUCCESS(rc) && cbActual != pXarHdr->cbTocUncompressed)
1898 pszOutput[pXarHdr->cbTocUncompressed] = '\0';
1904 if ( cchToc == pXarHdr->cbTocUncompressed
1905 || cchToc + 1 == pXarHdr->cbTocUncompressed)
1971 * @param pXarHdr Where to return the XAR header in host byte order.
1973 static int rtZipXarReadAndValidateHeader(RTVFSIOSTREAM hVfsIosIn, PXARHEADER pXarHdr)
1978 int rc = RTVfsIoStrmRead(hVfsIosIn, pXarHdr, sizeof(*pXarHdr), true /*fBlocking*/, NULL);
1981 if (pXarHdr->u32Magic != XAR_HEADER_MAGIC)
1987 pXarHdr->cbHeader = RT_BE2H_U16(pXarHdr->cbHeader);
1988 pXarHdr->uVersion = RT_BE2H_U16(pXarHdr->uVersion);
1989 pXarHdr->cbTocCompressed = RT_BE2H_U64(pXarHdr->cbTocCompressed);
1990 pXarHdr->cbTocUncompressed = RT_BE2H_U64(pXarHdr->cbTocUncompressed);
1991 pXarHdr->uHashFunction = RT_BE2H_U32(pXarHdr->uHashFunction);
1996 if (pXarHdr->uVersion > XAR_HEADER_VERSION)
1998 if (pXarHdr->cbHeader < sizeof(XARHEADER))
2000 if (pXarHdr->uHashFunction > XAR_HASH_MAX)
2002 if (pXarHdr->cbTocUncompressed < 16)
2004 if (pXarHdr->cbTocUncompressed > _4M)
2006 if (pXarHdr->cbTocCompressed > _4M)
2012 if (pXarHdr->cbHeader > sizeof(XARHEADER))
2014 rc = RTVfsIoStrmSkip(hVfsIosIn, pXarHdr->cbHeader - sizeof(XARHEADER));