Index: third_party/zlib/contrib/minizip/mztools.c |
diff --git a/third_party/zlib/contrib/minizip/mztools.c b/third_party/zlib/contrib/minizip/mztools.c |
index 8bf9cca326338a0de6634359069bc8bd0d0b40db..026bf2820e60bddf3016b81df86afc0860f2d538 100644 |
--- a/third_party/zlib/contrib/minizip/mztools.c |
+++ b/third_party/zlib/contrib/minizip/mztools.c |
@@ -42,7 +42,7 @@ |
int entries = 0; |
uLong totalBytes = 0; |
char header[30]; |
- char filename[1024]; |
+ char filename[256]; |
char extra[1024]; |
int offset = 0; |
int offsetCD = 0; |
@@ -73,14 +73,9 @@ |
/* Filename */ |
if (fnsize > 0) { |
- if (fnsize < sizeof(filename)) { |
- if (fread(filename, 1, fnsize, fpZip) == fnsize) { |
- if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { |
- offset += fnsize; |
- } else { |
- err = Z_ERRNO; |
- break; |
- } |
+ if (fread(filename, 1, fnsize, fpZip) == fnsize) { |
+ if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { |
+ offset += fnsize; |
} else { |
err = Z_ERRNO; |
break; |
@@ -96,14 +91,9 @@ |
/* Extra field */ |
if (extsize > 0) { |
- if (extsize < sizeof(extra)) { |
- if (fread(extra, 1, extsize, fpZip) == extsize) { |
- if (fwrite(extra, 1, extsize, fpOut) == extsize) { |
- offset += extsize; |
- } else { |
- err = Z_ERRNO; |
- break; |
- } |
+ if (fread(extra, 1, extsize, fpZip) == extsize) { |
+ if (fwrite(extra, 1, extsize, fpOut) == extsize) { |
+ offset += extsize; |
} else { |
err = Z_ERRNO; |
break; |