/* Structural information about the archive. */
struct archive_string format_name;
int64_t central_directory_offset;
+ int64_t central_directory_offset_actual;
size_t central_directory_entries_total;
size_t central_directory_entries_on_this_disk;
int has_encrypted_entries;
/* Save the central directory location for later use. */
zip->central_directory_offset = archive_le32dec(p + 16);
+ zip->central_directory_offset_actual = current_offset
+ - archive_le32dec(p+12) - 1;
/* This is just a tiny bit higher than the maximum
returned by the streaming Zip bidder. This ensures
/* Save the central directory offset for later use. */
zip->central_directory_offset = archive_le64dec(p + 48);
+ zip->central_directory_offset_actual = zip->central_directory_offset;
return 32;
}
* know the correction we need to apply to account for leading
* padding.
*/
- if (__archive_read_seek(a, zip->central_directory_offset, SEEK_SET) < 0)
+ if (__archive_read_seek(a, zip->central_directory_offset_actual, SEEK_SET)
+ < 0)
return ARCHIVE_FATAL;
found = 0;