diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-03-28 05:02:08 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-03-28 05:02:08 (GMT) |
commit | 02ed0444e9b638c52eed39e6f36190b91f5bd3a8 (patch) | |
tree | 9611bb50ad6a220cc0e1ce695d8be9ff54f70d53 /compat/zlib | |
parent | bc060f980cb4e43d0aa03762c8a9cd6110faddbc (diff) | |
parent | 2616ef0ef16085f9c15283dfb56c9ccfd3f2da5d (diff) | |
download | tcl-02ed0444e9b638c52eed39e6f36190b91f5bd3a8.zip tcl-02ed0444e9b638c52eed39e6f36190b91f5bd3a8.tar.gz tcl-02ed0444e9b638c52eed39e6f36190b91f5bd3a8.tar.bz2 |
Merge 8.6. POSIX errors update and minizip fix
Diffstat (limited to 'compat/zlib')
-rw-r--r-- | compat/zlib/contrib/minizip/minizip.c | 4 |
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); |