diff options
-rw-r--r-- | archival/libarchive/get_header_tar.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c index cc6f3f0ad..5fd5a7980 100644 --- a/archival/libarchive/get_header_tar.c +++ b/archival/libarchive/get_header_tar.c | |||
@@ -239,8 +239,13 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) | |||
239 | /* Check header has valid magic, "ustar" is for the proper tar, | 239 | /* Check header has valid magic, "ustar" is for the proper tar, |
240 | * five NULs are for the old tar format */ | 240 | * five NULs are for the old tar format */ |
241 | if (!is_prefixed_with(tar.magic, "ustar") | 241 | if (!is_prefixed_with(tar.magic, "ustar") |
242 | #if !ENABLE_PLATFORM_MINGW32 | ||
242 | && (!ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY | 243 | && (!ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY |
243 | || memcmp(tar.magic, "\0\0\0\0", 5) != 0) | 244 | || memcmp(tar.magic, "\0\0\0\0", 5) != 0) |
245 | #else | ||
246 | && (!ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY | ||
247 | || memcmp(tar.magic, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) != 0) | ||
248 | #endif | ||
244 | ) { | 249 | ) { |
245 | #if ENABLE_FEATURE_TAR_AUTODETECT | 250 | #if ENABLE_FEATURE_TAR_AUTODETECT |
246 | autodetect: | 251 | autodetect: |