aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/minizip/miniunz.c2
-rw-r--r--contrib/minizip/zip.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c
index c1806728..8aa788f1 100644
--- a/contrib/minizip/miniunz.c
+++ b/contrib/minizip/miniunz.c
@@ -151,7 +151,7 @@ static int makedir(const char *newdir) {
151 printf("Error allocating memory\n"); 151 printf("Error allocating memory\n");
152 return UNZ_INTERNALERROR; 152 return UNZ_INTERNALERROR;
153 } 153 }
154 strcpy(buffer,newdir); 154 memcpy(buffer,newdir,len+1);
155 155
156 if (buffer[len-1] == '/') { 156 if (buffer[len-1] == '/') {
157 buffer[len-1] = '\0'; 157 buffer[len-1] = '\0';
diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
index 46943cec..0ec6fe1b 100644
--- a/contrib/minizip/zip.c
+++ b/contrib/minizip/zip.c
@@ -504,7 +504,7 @@ extern int ZEXPORT zipAlreadyThere(zipFile file, char const *name) {
504 /* Return true if name is in the central directory. */ 504 /* Return true if name is in the central directory. */
505 size_t len = strlen(name); 505 size_t len = strlen(name);
506 char *copy = set_alloc(&zip->set, NULL, len + 1); 506 char *copy = set_alloc(&zip->set, NULL, len + 1);
507 strcpy(copy, name); 507 memcpy(copy, name, len + 1);
508 int found = set_found(&zip->set, copy); 508 int found = set_found(&zip->set, copy);
509 set_free(&zip->set, copy); 509 set_free(&zip->set, copy);
510 return found; 510 return found;