summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/minizip/zip.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
index 3d3d4ca..0446109 100644
--- a/contrib/minizip/zip.c
+++ b/contrib/minizip/zip.c
@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
1043 return ZIP_PARAMERROR; 1043 return ZIP_PARAMERROR;
1044#endif 1044#endif
1045 1045
1046 // The filename and comment length must fit in 16 bits.
1047 if ((filename!=NULL) && (strlen(filename)>0xffff))
1048 return ZIP_PARAMERROR;
1049 if ((comment!=NULL) && (strlen(comment)>0xffff))
1050 return ZIP_PARAMERROR;
1051 // The extra field length must fit in 16 bits. If the member also requires
1052 // a Zip64 extra block, that will also need to fit within that 16-bit
1053 // length, but that will be checked for later.
1054 if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
1055 return ZIP_PARAMERROR;
1056
1046 zi = (zip64_internal*)file; 1057 zi = (zip64_internal*)file;
1047 1058
1048 if (zi->in_opened_file_inzip == 1) 1059 if (zi->in_opened_file_inzip == 1)