1commit f3ace98803035b8425d127fb3d874dafe0b9475a 2Author: Che-yu Wu <[email protected]> 3Date: Mon Aug 6 14:09:22 2018 +0000 4 5 Enable traditional PKWARE decryption in zlib/contrib/minizip. 6 7 Remove the #define which enables NOUNCRYPT by default. 8 Correct the value of rest_read_compressed when decompressing an encrypted zip. 9 10 Bug: crbug.com/869541 11 Change-Id: Ia86c1d234a8193f405147d35ad05c29fe86f812d 12 Reviewed-on: https://chromium-review.googlesource.com/1161109 13 Reviewed-by: Chris Blume <[email protected]> 14 Commit-Queue: Che-yu Wu <[email protected]> 15 Cr-Commit-Position: refs/heads/master@{#580862} 16 17diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib/minizip/unzip.c 18index 82275d6c1775d..c8a01b23efd42 100644 19--- a/third_party/zlib/contrib/minizip/unzip.c 20+++ b/third_party/zlib/contrib/minizip/unzip.c 21@@ -68,10 +68,6 @@ 22 #include <stdlib.h> 23 #include <string.h> 24 25-#ifndef NOUNCRYPT 26- #define NOUNCRYPT 27-#endif 28- 29 #include "zlib.h" 30 #include "unzip.h" 31 32@@ -1502,6 +1498,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method, 33 zdecode(s->keys,s->pcrc_32_tab,source[i]); 34 35 s->pfile_in_zip_read->pos_in_zipfile+=12; 36+ s->pfile_in_zip_read->rest_read_compressed-=12; 37 s->encrypted=1; 38 } 39 # endif 40