#define LA_USED_ZIP64 (1 << 0)
#define LA_FROM_CENTRAL_DIRECTORY (1 << 1)
-/*
+/*
* See "WinZip - AES Encryption Information"
* http://www.winzip.com/aes_info.htm
*/
archive_entry_set_atime(entry, zip_entry->atime, 0);
if ((zip->entry->mode & AE_IFMT) == AE_IFLNK) {
- size_t linkname_length = zip_entry->compressed_size;
+ size_t linkname_length = (size_t)zip_entry->compressed_size;
archive_entry_set_size(entry, 0);
p = __archive_read_ahead(a, linkname_length, NULL);
buff_remaining = 0;
else
buff_remaining =
- zip->entry_bytes_remaining
+ (size_t)zip->entry_bytes_remaining
- zip->decrypted_bytes_remaining;
}
}
eocd64_size = archive_le64dec(p + 4) + 12;
if (eocd64_size < 56 || eocd64_size > 16384)
return;
- if ((p = __archive_read_ahead(a, eocd64_size, NULL)) == NULL)
+ if ((p = __archive_read_ahead(a, (size_t)eocd64_size, NULL)) == NULL)
return;
/* Sanity-check the EOCD64 */
/*rtm*/w->now,
/*mtm*/archive_entry_mtime(entry),
/*cty*/NULL,
- /*len*/archive_entry_size(entry),
+ /*len*/(size_t)archive_entry_size(entry),
};
ssize_t r;
assertEqualIntA(a, archive_read_has_encrypted_entries(a), 0);
/* Save contents of inner Zip. */
- innerLength = archive_entry_size(ae);
+ innerLength = (size_t)archive_entry_size(ae);
inner = calloc(innerLength, 1);
assertEqualInt(innerLength, archive_read_data(a, inner, innerLength));
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a));
assertEqualIntA(a, ARCHIVE_OK, read_open_memory_seek(a, inner, innerLength, 1));
-
+
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
assertEqualString("another_file.txt", archive_entry_pathname(ae));
assertEqualInt(29, archive_entry_size(ae));