Changeset 34049 in vbox
- Timestamp:
- Nov 13, 2010 1:31:07 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 67731
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/err.h
r34045 r34049 1299 1299 * the input stream. */ 1300 1300 #define VERR_TAR_EOS_MORE_INPUT (-928) 1301 /** A number tar header field was malformed. */ 1302 #define VERR_TAR_BAD_NUM_FIELD (-929) 1303 /** A numeric tar header field was not terminated correctly. */ 1304 #define VERR_TAR_BAD_NUM_FIELD_TERM (-930) 1305 /** A number tar header field was encoded using base-256 which this 1306 * tar implementation currently does not support. */ 1307 #define VERR_TAR_BASE_256_NOT_SUPPORTED (-931) 1308 /** A number tar header field yielded a value too large for the internal 1309 * variable of the tar interpreter. */ 1310 #define VERR_TAR_NUM_VALUE_TOO_LARGE (-932) 1311 /** The combined minor and major device number type is too small to hold the 1312 * value stored in the tar header. */ 1313 #define VERR_TAR_DEV_VALUE_TOO_LARGE (-933) 1314 /** The mode field in a tar header is bad. */ 1315 #define VERR_TAR_BAD_MODE_FIELD (-934) 1316 /** The mode field should not include the type. */ 1317 #define VERR_TAR_MODE_WITH_TYPE (-935) 1318 /** The size field should be zero for links and symlinks. */ 1319 #define VERR_TAR_SIZE_NOT_ZERO (-936) 1320 /** Encountered an unknown type flag. */ 1321 #define VERR_TAR_UNKNOWN_TYPE_FLAG (-937) 1322 /** The tar header is all zeros. */ 1323 #define VERR_TAR_ZERO_HEADER (-938) 1324 /** Not a uniform standard tape archive header. */ 1325 #define VERR_TAR_NOT_USTAR (-939) 1326 /** The name is empty. */ 1327 #define VERR_TAR_EMPTY_NAME (-940) 1328 /** A non-directory entry has a name ending with a slash. */ 1329 #define VERR_TAR_NON_DIR_ENDS_WITH_SLASH (-941) 1330 /** Encountered an unsupported portable archive exchange (pax) header. */ 1331 #define VERR_TAR_UNSUPPORTED_PAX_TYPE (-942) 1332 /** Encountered an unsupported Solaris Tar extension. */ 1333 #define VERR_TAR_UNSUPPORTED_SOLARIS_HDR_TYPE (-943) 1334 /** Encountered an unsupported GNU Tar extension. */ 1335 #define VERR_TAR_UNSUPPORTED_GNU_HDR_TYPE (-944) 1336 /** Malformed checksum field in the tar header. */ 1337 #define VERR_TAR_BAD_CHKSUM_FIELD (-945) 1301 1338 /** @} */ 1302 1339 -
trunk/include/iprt/types.h
r33973 r34049 547 547 typedef RTDEV *PRTDEV; 548 548 549 /** @name RTDEV Macros 550 * @{ */ 551 /** 552 * Our makedev macro. 553 * @returns RTDEV 554 * @param uMajor The major device number. 555 * @param uMinor The minor device number. 556 */ 557 #define RTDEV_MAKE(uMajor, uMinor) ((RTDEV)( ((RTDEV)(uMajor) << 24) | (uMinor & UINT32_C(0x00ffffff)) )) 558 /** 559 * Get the major device node number from an RTDEV type. 560 * @returns The major device number of @a uDev 561 * @param uDev The device number. 562 */ 563 #define RTDEV_MAJOR(uDev) ((uDev) >> 24) 564 /** 565 * Get the minor device node number from an RTDEV type. 566 * @returns The minor device number of @a uDev 567 * @param uDev The device number. 568 */ 569 #define RTDEV_MINOR(uDev) ((uDev) & UINT32_C(0x00ffffff)) 570 /** @} */ 571 549 572 /** i-node number. */ 550 573 typedef uint64_t RTINODE; -
trunk/src/VBox/Runtime/common/zip/gzipvfs.cpp
r34027 r34049 442 442 { 443 443 PRTZIPGZIPSTREAM pThis = (PRTZIPGZIPSTREAM)pvThis; 444 return pThis->offStream; 444 *poffActual = pThis->offStream; 445 return VINF_SUCCESS; 445 446 } 446 447 … … 486 487 RTVFSIOSTREAM hVfsIos; 487 488 PRTZIPGZIPSTREAM pThis; 488 int rc = RTVfsNewIoStream(&g_rtZipGzipOps, sizeof(RTZIPGZIPSTREAM), RTFILE_O_READ, NIL_RTVFS, NIL_RT SEMRW,489 int rc = RTVfsNewIoStream(&g_rtZipGzipOps, sizeof(RTZIPGZIPSTREAM), RTFILE_O_READ, NIL_RTVFS, NIL_RTVFSLOCK, 489 490 &hVfsIos, (void **)&pThis); 490 491 if (RT_SUCCESS(rc)) -
trunk/src/VBox/Runtime/common/zip/tar.h
r34029 r34049 32 32 /** @name RTZIPTARHDRPOSIX::typeflag 33 33 * @{ */ 34 #define RTZIPTAR_TF_OLDNORMAL '\0' /**< Normal disk file, Unix compatible */ 35 #define RTZIPTAR_TF_NORMAL '0' /**< Normal disk file */ 36 #define RTZIPTAR_TF_LINK '1' /**< Link to previously dumped file */ 37 #define RTZIPTAR_TF_SYMLINK '2' /**< Symbolic link */ 38 #define RTZIPTAR_TF_CHR '3' /**< Character special file */ 39 #define RTZIPTAR_TF_BLK '4' /**< Block special file */ 40 #define RTZIPTAR_TF_DIR '5' /**< Directory */ 41 #define RTZIPTAR_TF_FIFO '6' /**< FIFO special file */ 42 #define RTZIPTAR_TF_CONTIG '7' /**< Contiguous file */ 34 #define RTZIPTAR_TF_OLDNORMAL '\0' /**< Normal disk file, Unix compatible */ 35 #define RTZIPTAR_TF_NORMAL '0' /**< Normal disk file */ 36 #define RTZIPTAR_TF_LINK '1' /**< Link to previously dumped file */ 37 #define RTZIPTAR_TF_SYMLINK '2' /**< Symbolic link */ 38 #define RTZIPTAR_TF_CHR '3' /**< Character special file */ 39 #define RTZIPTAR_TF_BLK '4' /**< Block special file */ 40 #define RTZIPTAR_TF_DIR '5' /**< Directory */ 41 #define RTZIPTAR_TF_FIFO '6' /**< FIFO special file */ 42 #define RTZIPTAR_TF_CONTIG '7' /**< Contiguous file */ 43 44 #define RTZIPTAR_TF_X_HDR 'x' /**< Extended header. */ 45 #define RTZIPTAR_TF_X_GLOBAL 'g' /**< Global extended header. */ 46 47 #define RTZIPTAR_TF_SOLARIS_XHDR 'X' 48 49 #define RTZIPTAR_TF_GNU_DUMPDIR 'D' 50 #define RTZIPTAR_TF_GNU_LONGLINK 'K' 51 #define RTZIPTAR_TF_GNU_LONGNAME 'L' 52 #define RTZIPTAR_TF_GNU_MULTIVOL 'M' 53 #define RTZIPTAR_TF_GNU_SPARSE 'S' 54 #define RTZIPTAR_TF_GNU_VOLDHR 'V' 43 55 /** @} */ 56 57 /** The uniform standard tape archive format magic value. */ 58 #define RTZIPTAR_USTAR_MAGIC "ustar" 59 /** The ustar version string. 60 * @remarks The terminator character is not part of the field. */ 61 #define RTZIPTAR_USTAR_VERSION "00" 62 44 63 45 64 /** -
trunk/src/VBox/Runtime/common/zip/tarvfs.cpp
r34045 r34049 112 112 113 113 114 115 /** 116 * Checks if the TAR header includes a posix user name field. 114 /** 115 * Checks if the TAR header is in the ustar format. 117 116 * 118 117 * @returns true / false. 119 118 * @param pTar The TAR header. 120 119 */ 121 DECLINLINE(bool) rtZipTarHdrHasPosixUserName(PCRTZIPTARHDR pTar) 122 { 123 return true; 124 } 125 126 127 /** 128 * Checks if the TAR header includes a posix group name field. 120 DECLINLINE(bool) rtZipTarHdrIsUstar(PCRTZIPTARHDR pTar) 121 { 122 return pTar->Posix.magic[0] == 'u' 123 && pTar->Posix.magic[1] == 's' 124 && pTar->Posix.magic[2] == 't' 125 && pTar->Posix.magic[3] == 'a' 126 && pTar->Posix.magic[4] == 'r' 127 && pTar->Posix.magic[5] == '\0' 128 && pTar->Posix.version[0] == '0' 129 && pTar->Posix.version[1] == '0'; 130 } 131 132 133 /** 134 * Checks if the TAR header is in the ustar format and has a regular file type. 129 135 * 130 136 * @returns true / false. 131 137 * @param pTar The TAR header. 132 138 */ 133 DECLINLINE(bool) rtZipTarHdrHasPosixGroupName(PCRTZIPTARHDR pTar) 134 { 135 return true; 136 } 137 138 139 /** 140 * Checks if the TAR header includes a posix compatible path prefix field. 139 DECLINLINE(bool) rtZipTarHdrIsRegularUstar(PCRTZIPTARHDR pTar) 140 { 141 return rtZipTarHdrIsUstar(pTar) 142 && ( ( pTar->Posix.typeflag >= RTZIPTAR_TF_NORMAL 143 && pTar->Posix.typeflag <= RTZIPTAR_TF_CONTIG) 144 || pTar->Posix.typeflag == RTZIPTAR_TF_OLDNORMAL); 145 } 146 147 148 /** 149 * Checks if the TAR header includes a posix user name field. 141 150 * 142 151 * @returns true / false. 143 152 * @param pTar The TAR header. 144 153 */ 154 DECLINLINE(bool) rtZipTarHdrHasPosixUserName(PCRTZIPTARHDR pTar) 155 { 156 return pTar->Posix.uname[0] != '\0' 157 && rtZipTarHdrIsUstar(pTar); 158 } 159 160 161 /** 162 * Checks if the TAR header includes a posix group name field. 163 * 164 * @returns true / false. 165 * @param pTar The TAR header. 166 */ 167 DECLINLINE(bool) rtZipTarHdrHasPosixGroupName(PCRTZIPTARHDR pTar) 168 { 169 return pTar->Posix.gname[0] != '\0' 170 && rtZipTarHdrIsUstar(pTar); 171 } 172 173 174 /** 175 * Checks if the TAR header includes a posix compatible path prefix field. 176 * 177 * @returns true / false. 178 * @param pTar The TAR header. 179 */ 145 180 DECLINLINE(bool) rtZipTarHdrHasPrefix(PCRTZIPTARHDR pTar) 146 181 { 147 return pTar->Posix.prefix[0] != '\0'; 148 } 149 150 151 /** 152 * Validates the TAR header. 153 * 154 * @returns VINF_SUCCESS if valid, appropriate VERR_TAR_XXX if not. 155 * @param pTar The TAR header. 156 */ 157 static int rtZipTarHdrValidate(PCRTZIPTARHDR pTar) 158 { 159 return VINF_SUCCESS; 182 return pTar->Posix.prefix[0] != '\0' 183 && rtZipTarHdrIsUstar(pTar); 160 184 } 161 185 … … 173 197 static int rtZipTarHdrFieldToNum(const char *pszField, size_t cchField, bool fOctalOnly, int64_t *pi64) 174 198 { 175 /** @todo check for base256 and more */ 176 return RTStrToInt64Full(pszField, 8, pi64); 199 size_t const cchFieldOrg = cchField; 200 if ( fOctalOnly 201 || !(*(unsigned char *)pszField & 0x80)) 202 { 203 /* 204 * Skip leading zeros, saving a few slower loops below. 205 */ 206 while (cchField > 0 && *pszField == '0') 207 cchField--, pszField++; 208 209 /* 210 * Convert octal digits. 211 */ 212 int64_t i64 = 0; 213 while (cchField > 0) 214 { 215 unsigned char uDigit = *pszField - '0'; 216 if (uDigit >= 8) 217 break; 218 i64 <<= 3; 219 i64 |= uDigit; 220 221 pszField++; 222 cchField--; 223 } 224 *pi64 = i64; 225 226 /* 227 * Was it terminated correctly? 228 */ 229 while (cchField > 0) 230 { 231 char ch = *pszField++; 232 if (ch != 0 && ch != ' ') 233 return cchField < cchFieldOrg 234 ? VERR_TAR_BAD_NUM_FIELD_TERM 235 : VERR_TAR_BAD_NUM_FIELD; 236 cchField--; 237 } 238 } 239 else 240 { 241 /** @todo implement base-256 encoded fields. */ 242 return VERR_TAR_BASE_256_NOT_SUPPORTED; 243 } 244 245 return VINF_SUCCESS; 246 } 247 248 249 /** 250 * Calculates the tar header checksums and detects if it's all zeros. 251 * 252 * @returns true if all zeros, false if not. 253 * @param pHdr The header to checksum. 254 * @param pi32Unsigned Where to store the checksum calculated using 255 * unsigned chars. This is the one POSIX 256 * specifies. 257 * @param pi32Signed Where to store the checksum calculated using 258 * signed chars. 259 * 260 * @remarks The reason why we calculate the checksum as both signed and unsigned 261 * has to do with various the char C type being signed on some hosts 262 * and unsigned on others. 263 */ 264 static bool rtZipTarCalcChkSum(PCRTZIPTARHDR pHdr, int32_t *pi32Unsigned, int32_t *pi32Signed) 265 { 266 int32_t i32Unsigned = 0; 267 int32_t i32Signed = 0; 268 269 /* 270 * Sum up the entire header. 271 */ 272 const char *pch = (const char *)pHdr; 273 const char *pchEnd = pch + sizeof(*pHdr); 274 do 275 { 276 i32Unsigned += *(unsigned char *)pch; 277 i32Signed += *(signed char *)pch; 278 } while (++pch != pchEnd); 279 280 /* 281 * Check if it's all zeros and replace the chksum field with spaces. 282 */ 283 bool const fZeroHdr = i32Unsigned == 0; 284 285 pch = pHdr->Posix.chksum; 286 pchEnd = pch + sizeof(pHdr->Posix.chksum); 287 do 288 { 289 i32Unsigned -= *(unsigned char *)pch; 290 i32Signed -= *(signed char *)pch; 291 pch++; 292 } while (++pch != pchEnd); 293 294 i32Unsigned += (unsigned char)' ' * sizeof(pHdr->Posix.chksum); 295 i32Signed += (signed char)' ' * sizeof(pHdr->Posix.chksum); 296 297 *pi32Unsigned = i32Unsigned; 298 if (pi32Signed) 299 *pi32Signed = i32Signed; 300 return fZeroHdr; 301 } 302 303 304 /** 305 * Validates the TAR header. 306 * 307 * @returns VINF_SUCCESS if valid, appropriate VERR_TAR_XXX if not. 308 * @param pTar The TAR header. 309 */ 310 static int rtZipTarHdrValidate(PCRTZIPTARHDR pTar) 311 { 312 /* 313 * Calc the checksum first since this enables us to detect zero headers. 314 */ 315 int32_t i32ChkSum; 316 int32_t i32ChkSumSignedAlt; 317 if (rtZipTarCalcChkSum(pTar, &i32ChkSum, &i32ChkSumSignedAlt)) 318 return VERR_TAR_ZERO_HEADER; 319 320 /* 321 * Read the checksum field and match the checksums. 322 */ 323 int64_t i64HdrChkSum; 324 int rc = rtZipTarHdrFieldToNum(pTar->Posix.chksum, sizeof(pTar->Posix.chksum), true /*fOctalOnly*/, &i64HdrChkSum); 325 if (RT_FAILURE(rc)) 326 return VERR_TAR_BAD_CHKSUM_FIELD; 327 // if ( i32ChkSum != i64HdrChkSum 328 // && i32ChkSumSignedAlt != i64HdrChkSum) /** @todo check this */ 329 // return VERR_TAR_CHKSUM_MISMATCH; 330 331 /* 332 * Perform some basic checks. 333 */ 334 if (!rtZipTarHdrIsUstar(pTar)) 335 return VERR_TAR_NOT_USTAR; 336 337 switch (pTar->Posix.typeflag) 338 { 339 case RTZIPTAR_TF_OLDNORMAL: 340 case RTZIPTAR_TF_NORMAL: 341 case RTZIPTAR_TF_CONTIG: 342 case RTZIPTAR_TF_LINK: 343 case RTZIPTAR_TF_SYMLINK: 344 case RTZIPTAR_TF_CHR: 345 case RTZIPTAR_TF_BLK: 346 case RTZIPTAR_TF_FIFO: 347 { 348 if (!pTar->Posix.name[0]) 349 return VERR_TAR_EMPTY_NAME; 350 351 const char *pchEnd = RTStrEnd(&pTar->Posix.name[0], sizeof(pTar->Posix.name)); 352 pchEnd = pchEnd ? pchEnd - 1 : &pTar->Posix.name[sizeof(pTar->Posix.name) - 1]; 353 if (*pchEnd == '/') 354 return VERR_TAR_NON_DIR_ENDS_WITH_SLASH; 355 break; 356 } 357 358 case RTZIPTAR_TF_DIR: 359 if (!pTar->Posix.name[0]) 360 return VERR_TAR_EMPTY_NAME; 361 break; 362 363 case RTZIPTAR_TF_X_HDR: 364 case RTZIPTAR_TF_X_GLOBAL: 365 return VERR_TAR_UNSUPPORTED_PAX_TYPE; 366 367 case RTZIPTAR_TF_SOLARIS_XHDR: 368 return VERR_TAR_UNSUPPORTED_SOLARIS_HDR_TYPE; 369 370 case RTZIPTAR_TF_GNU_DUMPDIR: 371 case RTZIPTAR_TF_GNU_LONGLINK: 372 case RTZIPTAR_TF_GNU_LONGNAME: 373 case RTZIPTAR_TF_GNU_MULTIVOL: 374 case RTZIPTAR_TF_GNU_SPARSE: 375 case RTZIPTAR_TF_GNU_VOLDHR: 376 return VERR_TAR_UNSUPPORTED_GNU_HDR_TYPE; 377 } 378 379 return VINF_SUCCESS; 177 380 } 178 381 … … 181 384 * Translate a TAR header to an IPRT object info structure with additional UNIX 182 385 * attributes. 386 * 387 * This completes the validation done by rtZipTarHdrValidate. 183 388 * 184 389 * @returns VINF_SUCCESS if valid, appropriate VERR_TAR_XXX if not. … … 188 393 static int rtZipTarHdrToFsObjInfo(PCRTZIPTARHDR pTar, PRTFSOBJINFO pObjInfo) 189 394 { 395 /* 396 * Zap the whole structure, this takes care of unused space in the union. 397 */ 190 398 RT_ZERO(*pObjInfo); 191 int rc; 192 193 int64_t i64; 194 rc = rtZipTarHdrFieldToNum(pTar->Posix.size, sizeof(pTar->Posix.size), false, &i64); 195 AssertRCSuccessReturn(rc, rc); 196 pObjInfo->cbObject = i64; 197 399 400 /* 401 * Convert the tar field in RTFSOBJINFO order. 402 */ 403 int rc; 404 int64_t i64Tmp; 405 #define GET_TAR_NUMERIC_FIELD_RET(a_Var, a_Field) \ 406 do { \ 407 rc = rtZipTarHdrFieldToNum(a_Field, sizeof(a_Field), false /*fOctalOnly*/, &i64Tmp); \ 408 if (RT_FAILURE(rc)) \ 409 return rc; \ 410 (a_Var) = i64Tmp; \ 411 if ((a_Var) != i64Tmp) \ 412 return VERR_TAR_NUM_VALUE_TOO_LARGE; \ 413 } while (0) 414 415 GET_TAR_NUMERIC_FIELD_RET(pObjInfo->cbObject, pTar->Posix.size); 416 pObjInfo->cbAllocated = RT_ALIGN_64(pObjInfo->cbObject, 512); 417 int64_t c64SecModTime; 418 GET_TAR_NUMERIC_FIELD_RET(c64SecModTime, pTar->Posix.mtime); 419 RTTimeSpecSetSeconds(&pObjInfo->ChangeTime, c64SecModTime); 420 RTTimeSpecSetSeconds(&pObjInfo->ModificationTime, c64SecModTime); 421 RTTimeSpecSetSeconds(&pObjInfo->AccessTime, c64SecModTime); 422 RTTimeSpecSetSeconds(&pObjInfo->BirthTime, c64SecModTime); 423 if (c64SecModTime != RTTimeSpecGetSeconds(&pObjInfo->ModificationTime)) 424 return VERR_TAR_NUM_VALUE_TOO_LARGE; 425 GET_TAR_NUMERIC_FIELD_RET(pObjInfo->Attr.fMode, pTar->Posix.mode); 198 426 pObjInfo->Attr.enmAdditional = RTFSOBJATTRADD_UNIX; 427 GET_TAR_NUMERIC_FIELD_RET(pObjInfo->Attr.u.Unix.uid, pTar->Posix.uid); 428 GET_TAR_NUMERIC_FIELD_RET(pObjInfo->Attr.u.Unix.gid, pTar->Posix.gid); 429 pObjInfo->Attr.u.Unix.cHardlinks = 1; 430 pObjInfo->Attr.u.Unix.INodeIdDevice = 0; 431 pObjInfo->Attr.u.Unix.INodeId = 0; 432 pObjInfo->Attr.u.Unix.fFlags = 0; 433 pObjInfo->Attr.u.Unix.GenerationId = 0; 434 pObjInfo->Attr.u.Unix.Device = 0; 435 if ( pTar->Posix.typeflag == RTZIPTAR_TF_CHR 436 || pTar->Posix.typeflag == RTZIPTAR_TF_BLK) 437 { 438 uint32_t uMajor, uMinor; 439 GET_TAR_NUMERIC_FIELD_RET(uMajor, pTar->Posix.devmajor); 440 GET_TAR_NUMERIC_FIELD_RET(uMinor, pTar->Posix.devminor); 441 pObjInfo->Attr.u.Unix.Device = RTDEV_MAKE(uMajor, uMinor); 442 if ( uMajor != RTDEV_MAJOR(pObjInfo->Attr.u.Unix.Device) 443 || uMinor != RTDEV_MINOR(pObjInfo->Attr.u.Unix.Device)) 444 return VERR_TAR_DEV_VALUE_TOO_LARGE; 445 } 446 447 #undef GET_TAR_NUMERIC_FIELD_RET 448 449 /* 450 * Massage the result a little bit. 451 * Also validate some more now that we've got the numbers to work with. 452 */ 453 if (pObjInfo->Attr.fMode & ~RTFS_UNIX_MASK) 454 return VERR_TAR_BAD_MODE_FIELD; 455 456 RTFMODE fModeType; 457 switch (pTar->Posix.typeflag) 458 { 459 case RTZIPTAR_TF_OLDNORMAL: 460 case RTZIPTAR_TF_NORMAL: 461 case RTZIPTAR_TF_CONTIG: 462 fModeType |= RTFS_TYPE_FILE; 463 break; 464 465 case RTZIPTAR_TF_LINK: 466 if (pObjInfo->cbObject != 0) 467 return VERR_TAR_SIZE_NOT_ZERO; 468 fModeType |= RTFS_TYPE_FILE; /* no better idea for now */ 469 break; 470 471 case RTZIPTAR_TF_SYMLINK: 472 fModeType |= RTFS_TYPE_SYMLINK; 473 break; 474 475 case RTZIPTAR_TF_CHR: 476 fModeType |= RTFS_TYPE_DEV_CHAR; 477 break; 478 479 case RTZIPTAR_TF_BLK: 480 fModeType |= RTFS_TYPE_DEV_BLOCK; 481 break; 482 483 case RTZIPTAR_TF_DIR: 484 fModeType |= RTFS_TYPE_DIRECTORY; 485 break; 486 487 case RTZIPTAR_TF_FIFO: 488 fModeType |= RTFS_TYPE_FIFO; 489 break; 490 491 default: 492 return VERR_TAR_UNKNOWN_TYPE_FLAG; /* Should've been caught in validate. */ 493 } 494 if ( (pObjInfo->Attr.fMode & RTFS_TYPE_MASK) 495 && (pObjInfo->Attr.fMode & RTFS_TYPE_MASK) != fModeType) 496 return VERR_TAR_MODE_WITH_TYPE; 497 pObjInfo->Attr.fMode |= fModeType; 498 499 switch (pTar->Posix.typeflag) 500 { 501 case RTZIPTAR_TF_CHR: 502 case RTZIPTAR_TF_BLK: 503 case RTZIPTAR_TF_DIR: 504 case RTZIPTAR_TF_FIFO: 505 pObjInfo->cbObject = 0; 506 pObjInfo->cbAllocated = 0; 507 break; 508 } 199 509 200 510 return VINF_SUCCESS; … … 672 982 if (RT_FAILURE_NP(rc)) 673 983 { 674 if ( ASMMemIsAllU32(&Hdr, sizeof(Hdr), 0) == NULL)984 if (rc == VERR_TAR_ZERO_HEADER) 675 985 { 676 986 int rc2 = RTVfsIoStrmRead(pThis->hVfsIos, &Hdr, sizeof(Hdr), true /*fBlocking*/, &cbRead);
Note:
See TracChangeset
for help on using the changeset viewer.