summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-28 04:47:00 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-28 04:47:00 (GMT)
commit2616ef0ef16085f9c15283dfb56c9ccfd3f2da5d (patch)
tree0c9353da262b16361133c9151787ef5cc2f27477 /compat
parent82098d2dca6d710372f2cc12757f9295971c837f (diff)
downloadtcl-2616ef0ef16085f9c15283dfb56c9ccfd3f2da5d.zip
tcl-2616ef0ef16085f9c15283dfb56c9ccfd3f2da5d.tar.gz
tcl-2616ef0ef16085f9c15283dfb56c9ccfd3f2da5d.tar.bz2
Fix irritating gcc warning for minizip
Diffstat (limited to 'compat')
-rw-r--r--compat/zlib/contrib/minizip/minizip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/zlib/contrib/minizip/minizip.c b/compat/zlib/contrib/minizip/minizip.c
index e03e2b1..be1774f 100644
--- a/compat/zlib/contrib/minizip/minizip.c
+++ b/compat/zlib/contrib/minizip/minizip.c
@@ -365,7 +365,7 @@ void addFileToZip(zipFile zf, const char *filenameinzip, const char *password, i
void addPathToZip(zipFile zf, const char *filenameinzip, const char *password, int opt_exclude_path,int opt_compress_level) {
tinydir_dir dir;
int i;
- char newname[512];
+ char newname[MAXFILENAME+1+MAXFILENAME+1];
tinydir_open_sorted(&dir, filenameinzip);
@@ -375,7 +375,7 @@ void addPathToZip(zipFile zf, const char *filenameinzip, const char *password, i
tinydir_readfile_n(&dir, &file, i);
if(strcmp(file.name,".")==0) continue;
if(strcmp(file.name,"..")==0) continue;
- sprintf(newname,"%s/%s",dir.path,file.name);
+ sprintf(newname,"%.*s/%.*s", MAXFILENAME, dir.path, MAXFILENAME, file.name);
if (file.is_dir)
{
addPathToZip(zf,newname,password,opt_exclude_path,opt_compress_level);