diff options
author | DLL125 <134442578+DLL125@users.noreply.github.com> | 2023-09-24 10:18:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 10:18:54 +0200 |
commit | 2363506e099a8e55b6010f10f71ff8ea8e1c6dfc (patch) | |
tree | 3146efbbcc2cbcadd6e9d64463b5753c85c8dabe /src/Common/libzip/zip_close.c | |
parent | 937c5cd5cd57893e85601b472e7d6cfd5ffdc6ab (diff) | |
download | VeraCrypt-2363506e099a8e55b6010f10f71ff8ea8e1c6dfc.tar.gz VeraCrypt-2363506e099a8e55b6010f10f71ff8ea8e1c6dfc.zip |
Libzip 1.10.1 (#1209)
Updated to the latest version for the VeraCrypt 1.26.6 release.
Diffstat (limited to 'src/Common/libzip/zip_close.c')
-rw-r--r-- | src/Common/libzip/zip_close.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Common/libzip/zip_close.c b/src/Common/libzip/zip_close.c index 6b33cbf5..ddc2c245 100644 --- a/src/Common/libzip/zip_close.c +++ b/src/Common/libzip/zip_close.c @@ -396,6 +396,11 @@ add_data(zip_t *za, zip_source_t *src, zip_dirent_t *de, zip_uint32_t changed) { src_final = src; zip_source_keep(src_final); + if (!needs_decrypt && st.encryption_method == ZIP_EM_TRAD_PKWARE && (de->changed & ZIP_DIRENT_LAST_MOD)) { + /* PKWare encryption uses the last modification time for password verification, therefore we can't change it without re-encrypting. Ignoring the requested modification time change seems more sensible than failing to close the archive. */ + de->changed &= ~ZIP_DIRENT_LAST_MOD; + } + if (needs_decrypt) { zip_encryption_implementation impl; |