From 9ef592785b9d1d80e74a58f36bf9d50eaffa792d Mon Sep 17 00:00:00 2001 From: prot0man Date: Fri, 12 Jan 2024 12:21:55 -0500 Subject: [PATCH] Replace strcpy with more secure strncpy --- src/zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zip.c b/src/zip.c index a35f86e3..99b16f02 100644 --- a/src/zip.c +++ b/src/zip.c @@ -325,7 +325,7 @@ static int zip_archive_extract(mz_zip_archive *zip_archive, const char *dir, #if defined(_MSC_VER) strcpy_s(path, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE, dir); #else - strcpy(path, dir); + strncpy(path, dir, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE); #endif if (!ISSLASH(path[dirlen - 1])) {