From 932a5c97a36aa77041cc77e19b267849a35acded Mon Sep 17 00:00:00 2001 From: zhaogan Date: Mon, 16 Oct 2023 19:33:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?Issue:=20#I8846W=20Description:=E3=80=90?= =?UTF-8?q?=E6=BC=8F=E6=B4=9E=E3=80=91=20=E3=80=90master=E3=80=91=20CVE-20?= =?UTF-8?q?23-45853=20Sig:=20SIG=5FApplicaitonFramework=20Feature=20or=20B?= =?UTF-8?q?ugfix:=20Bugfix=20Binary=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaogan --- contrib/minizip/zip.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c index 4e611e1..d1fccff 100644 --- a/contrib/minizip/zip.c +++ b/contrib/minizip/zip.c @@ -1083,6 +1083,20 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, return ZIP_PARAMERROR; #endif + // The filename and comment length must fit in 16 bits. + if ((filename != NULL) && (strlen(filename) > 0xffff)) { + return ZIP_PARAMERROR; + } + if ((comment != NULL) && (strlen(comment) > 0xffff)) { + return ZIP_PARAMERROR; + } + // The extra field length must fit in 16 bits. If the member also requires + // a Zip64 extra block, that will also need to fit within that 16-bit + // length, but that will be checked for later. + if ((size_extrafield_local > 0xffff) || (size_extrafield_global > 0xffff)) { + return ZIP_PARAMERROR; + } + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) -- Gitee From 25563b752d5da11a99edc03af4dae172c6e06f8c Mon Sep 17 00:00:00 2001 From: zhaogan Date: Tue, 21 Nov 2023 14:16:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Issue:=20#I8I6WZ=20Description:=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=AF=86=E7=A0=81=E5=8E=8B=E7=BC=A9=C3=A5=C2=BD=C3=A2?= =?UTF-8?q?=20Sig:=20SIG=5FApplicaitonFramework=20Feature=20or=20Bugfix:?= =?UTF-8?q?=20Feature=20Binary=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaogan --- contrib/minizip/unzip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c index 85177a0..e376874 100644 --- a/contrib/minizip/unzip.c +++ b/contrib/minizip/unzip.c @@ -68,9 +68,9 @@ #include #include -#ifndef NOUNCRYPT - #define NOUNCRYPT -#endif +// #ifndef NOUNCRYPT +// #define NOUNCRYPT +// #endif #include "zlib.h" #include "unzip.h" -- Gitee From 999a0d5483462bd58465fc3ff54bdb176f5cd7d3 Mon Sep 17 00:00:00 2001 From: zhaogan Date: Tue, 5 Mar 2024 20:20:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=86=97=E4=BD=99NDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaogan --- BUILD.gn | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 463667a..91c5fa9 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -121,16 +121,3 @@ if (current_os == "ios") { part_name = "zlib" } } - -ohos_ndk_headers("zlib_header") { - sources = [ - "./zconf.h", - "./zlib.h", - ] -} - -ohos_ndk_library("libz_ndk") { - output_name = "z" - ndk_description_file = "./zlib.ndk.json" - output_extension = "so" -} -- Gitee