4
0
mirror of https://github.com/QuasarApp/zip.git synced 2025-05-05 16:49:34 +00:00

do not jump over initialisation ()

This commit is contained in:
Markus Pristovsek 2022-02-14 04:34:15 +09:00 committed by GitHub
parent babc060fab
commit 440570fcbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1155,6 +1155,8 @@ int zip_entry_close(struct zip_t *zip) {
mz_uint8 *pExtra_data = NULL;
mz_uint32 extra_size = 0;
mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE];
mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64];
mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32;
if (!zip) {
// zip_t handler is not initialized
@ -1185,9 +1187,6 @@ int zip_entry_close(struct zip_t *zip) {
mz_zip_time_t_to_dos_time(zip->entry.m_time, &dos_time, &dos_date);
#endif
mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64];
mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32;
MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID);
MZ_WRITE_LE32(local_dir_footer + 4, zip->entry.uncomp_crc32);
MZ_WRITE_LE64(local_dir_footer + 8, zip->entry.comp_size);