From e982dd4487ec11f3019463233a47047094e590c8 Mon Sep 17 00:00:00 2001 From: npt-1707 Date: Tue, 20 May 2025 23:53:35 +0800 Subject: [PATCH] Check for zero length path in mz_path_has_slash --- .../build_service/build_service/third_party/minizip/mz_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aios/apps/facility/build_service/build_service/third_party/minizip/mz_os.c b/aios/apps/facility/build_service/build_service/third_party/minizip/mz_os.c index d877936e6c..2c8f687d17 100644 --- a/aios/apps/facility/build_service/build_service/third_party/minizip/mz_os.c +++ b/aios/apps/facility/build_service/build_service/third_party/minizip/mz_os.c @@ -75,7 +75,7 @@ int32_t mz_path_remove_slash(char *path) int32_t mz_path_has_slash(const char *path) { int32_t path_len = (int32_t)strlen(path); - if (path[path_len - 1] != '\\' && path[path_len - 1] != '/') + if (path_len > 0 && path[path_len - 1] != '\\' && path[path_len - 1] != '/') return MZ_EXIST_ERROR; return MZ_OK; }