From 31e3e589153de55f4d2ef916e987942941a9692f Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 9 Jan 2025 14:14:24 +0100 Subject: [PATCH] Correct the value of rest_read_compressed when decompressing an encrypted zip --- contrib/minizip/unzip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c index a2ee14bd..d8ec3701 100644 --- a/contrib/minizip/unzip.c +++ b/contrib/minizip/unzip.c @@ -1498,6 +1498,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method, zdecode(s->keys,s->pcrc_32_tab,source[i]); s->pfile_in_zip_read->pos_in_zipfile+=12; + s->pfile_in_zip_read->rest_read_compressed-=12; s->encrypted=1; } # endif