mirror of
https://github.com/zlib-ng/minizip-ng
synced 2025-03-28 21:13:18 +00:00
Read NTFS extra field only if all (modify, access, creation) timestamps are present.
This commit is contained in:
parent
3679a3dcdc
commit
7063b0e2e9
@ -770,17 +770,17 @@ static int32_t mz_zip_entry_read_header(void *stream, uint8_t local, mz_zip_file
|
||||
if (err == MZ_OK)
|
||||
err = mz_stream_read_uint16(file_info_stream, &ntfs_attrib_size);
|
||||
|
||||
if (ntfs_attrib_id == 0x01 && ntfs_attrib_size >= 8)
|
||||
if (ntfs_attrib_id == 0x01 && ntfs_attrib_size == 24)
|
||||
{
|
||||
err = mz_stream_read_uint64(file_info_stream, &ntfs_time);
|
||||
mz_zip_ntfs_to_unix_time(ntfs_time, &file_info->modified_date);
|
||||
|
||||
if ((err == MZ_OK) && (ntfs_attrib_size >= 16))
|
||||
if (err == MZ_OK)
|
||||
{
|
||||
err = mz_stream_read_uint64(file_info_stream, &ntfs_time);
|
||||
mz_zip_ntfs_to_unix_time(ntfs_time, &file_info->accessed_date);
|
||||
}
|
||||
if ((err == MZ_OK) && (ntfs_attrib_size >= 24))
|
||||
if (err == MZ_OK)
|
||||
{
|
||||
err = mz_stream_read_uint64(file_info_stream, &ntfs_time);
|
||||
mz_zip_ntfs_to_unix_time(ntfs_time, &file_info->creation_date);
|
||||
|
Loading…
x
Reference in New Issue
Block a user