summaryrefslogtreecommitdiff
path: root/deps/zlib/contrib/minizip
diff options
context:
space:
mode:
Diffstat (limited to 'deps/zlib/contrib/minizip')
-rw-r--r--deps/zlib/contrib/minizip/ChangeLogUnzip67
-rw-r--r--deps/zlib/contrib/minizip/Makefile.am45
-rw-r--r--deps/zlib/contrib/minizip/MiniZip64_Changes.txt6
-rw-r--r--deps/zlib/contrib/minizip/MiniZip64_info.txt74
-rw-r--r--deps/zlib/contrib/minizip/configure.ac32
-rw-r--r--deps/zlib/contrib/minizip/ioapi.c2
-rw-r--r--deps/zlib/contrib/minizip/ioapi.h2
-rw-r--r--deps/zlib/contrib/minizip/iowin32.c7
-rw-r--r--deps/zlib/contrib/minizip/make_vms.com25
-rw-r--r--deps/zlib/contrib/minizip/miniunzip.163
-rw-r--r--deps/zlib/contrib/minizip/minizip.146
-rw-r--r--deps/zlib/contrib/minizip/minizip.pc.in12
-rw-r--r--deps/zlib/contrib/minizip/mztools.c2
-rw-r--r--deps/zlib/contrib/minizip/mztools.h2
-rw-r--r--deps/zlib/contrib/minizip/unzip.c12
-rw-r--r--deps/zlib/contrib/minizip/unzip.h2
-rw-r--r--deps/zlib/contrib/minizip/zip.c2
-rw-r--r--deps/zlib/contrib/minizip/zip.h2
18 files changed, 83 insertions, 320 deletions
diff --git a/deps/zlib/contrib/minizip/ChangeLogUnzip b/deps/zlib/contrib/minizip/ChangeLogUnzip
new file mode 100644
index 0000000000..e62af147dc
--- /dev/null
+++ b/deps/zlib/contrib/minizip/ChangeLogUnzip
@@ -0,0 +1,67 @@
+Change in 1.01e (12 feb 05)
+- Fix in zipOpen2 for globalcomment (Rolf Kalbermatter)
+- Fix possible memory leak in unzip.c (Zoran Stevanovic)
+
+Change in 1.01b (20 may 04)
+- Integrate patch from Debian package (submited by Mark Brown)
+- Add tools mztools from Xavier Roche
+
+Change in 1.01 (8 may 04)
+- fix buffer overrun risk in unzip.c (Xavier Roche)
+- fix a minor buffer insecurity in minizip.c (Mike Whittaker)
+
+Change in 1.00: (10 sept 03)
+- rename to 1.00
+- cosmetic code change
+
+Change in 0.22: (19 May 03)
+- crypting support (unless you define NOCRYPT)
+- append file in existing zipfile
+
+Change in 0.21: (10 Mar 03)
+- bug fixes
+
+Change in 0.17: (27 Jan 02)
+- bug fixes
+
+Change in 0.16: (19 Jan 02)
+- Support of ioapi for virtualize zip file access
+
+Change in 0.15: (19 Mar 98)
+- fix memory leak in minizip.c
+
+Change in 0.14: (10 Mar 98)
+- fix bugs in minizip.c sample for zipping big file
+- fix problem in month in date handling
+- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for
+ comment handling
+
+Change in 0.13: (6 Mar 98)
+- fix bugs in zip.c
+- add real minizip sample
+
+Change in 0.12: (4 Mar 98)
+- add zip.c and zip.h for creates .zip file
+- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly)
+- fix miniunz.c for file without specific record for directory
+
+Change in 0.11: (3 Mar 98)
+- fix bug in unzGetCurrentFileInfo for get extra field and comment
+- enhance miniunz sample, remove the bad unztst.c sample
+
+Change in 0.10: (2 Mar 98)
+- fix bug in unzReadCurrentFile
+- rename unzip* to unz* function and structure
+- remove Windows-like hungary notation variable name
+- modify some structure in unzip.h
+- add somes comment in source
+- remove unzipGetcCurrentFile function
+- replace ZUNZEXPORT by ZEXPORT
+- add unzGetLocalExtrafield for get the local extrafield info
+- add a new sample, miniunz.c
+
+Change in 0.4: (25 Feb 98)
+- suppress the type unzipFileInZip.
+ Only on file in the zipfile can be open at the same time
+- fix somes typo in code
+- added tm_unz structure in unzip_file_info (date/time in readable format)
diff --git a/deps/zlib/contrib/minizip/Makefile.am b/deps/zlib/contrib/minizip/Makefile.am
deleted file mode 100644
index d343011ebc..0000000000
--- a/deps/zlib/contrib/minizip/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-lib_LTLIBRARIES = libminizip.la
-
-if COND_DEMOS
-bin_PROGRAMS = miniunzip minizip
-endif
-
-zlib_top_srcdir = $(top_srcdir)/../..
-zlib_top_builddir = $(top_builddir)/../..
-
-AM_CPPFLAGS = -I$(zlib_top_srcdir)
-AM_LDFLAGS = -L$(zlib_top_builddir)
-
-if WIN32
-iowin32_src = iowin32.c
-iowin32_h = iowin32.h
-endif
-
-libminizip_la_SOURCES = \
- ioapi.c \
- mztools.c \
- unzip.c \
- zip.c \
- ${iowin32_src}
-
-libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
-
-minizip_includedir = $(includedir)/minizip
-minizip_include_HEADERS = \
- crypt.h \
- ioapi.h \
- mztools.h \
- unzip.h \
- zip.h \
- ${iowin32_h}
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = minizip.pc
-
-EXTRA_PROGRAMS = miniunzip minizip
-
-miniunzip_SOURCES = miniunz.c
-miniunzip_LDADD = libminizip.la
-
-minizip_SOURCES = minizip.c
-minizip_LDADD = libminizip.la -lz
diff --git a/deps/zlib/contrib/minizip/MiniZip64_Changes.txt b/deps/zlib/contrib/minizip/MiniZip64_Changes.txt
deleted file mode 100644
index 13a1bd91a9..0000000000
--- a/deps/zlib/contrib/minizip/MiniZip64_Changes.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MiniZip 1.1 was derrived from MiniZip at version 1.01f
-
-Change in 1.0 (Okt 2009)
- - **TODO - Add history**
-
diff --git a/deps/zlib/contrib/minizip/MiniZip64_info.txt b/deps/zlib/contrib/minizip/MiniZip64_info.txt
deleted file mode 100644
index 57d7152420..0000000000
--- a/deps/zlib/contrib/minizip/MiniZip64_info.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson
-
-Introduction
----------------------
-MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html )
-
-When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0.
-All possible work was done for compatibility.
-
-
-Background
----------------------
-When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64
-support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ )
-
-That was used as a starting point. And after that ZIP64 support was added to zip.c
-some refactoring and code cleanup was also done.
-
-
-Changed from MiniZip 1.0 to MiniZip 1.1
----------------------------------------
-* Added ZIP64 support for unzip ( by Even Rouault )
-* Added ZIP64 support for zip ( by Mathias Svensson )
-* Reverted some changed that Even Rouault did.
-* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users.
-* Added unzip patch for BZIP Compression method (patch create by Daniel Borca)
-* Added BZIP Compress method for zip
-* Did some refactoring and code cleanup
-
-
-Credits
-
- Gilles Vollant - Original MiniZip author
- Even Rouault - ZIP64 unzip Support
- Daniel Borca - BZip Compression method support in unzip
- Mathias Svensson - ZIP64 zip support
- Mathias Svensson - BZip Compression method support in zip
-
- Resources
-
- ZipLayout http://result42.com/projects/ZipFileLayout
- Command line tool for Windows that shows the layout and information of the headers in a zip archive.
- Used when debugging and validating the creation of zip files using MiniZip64
-
-
- ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT
- Zip File specification
-
-
-Notes.
- * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined.
-
-License
-----------------------------------------------------------
- Condition of use and distribution are the same than zlib :
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
-----------------------------------------------------------
-
diff --git a/deps/zlib/contrib/minizip/configure.ac b/deps/zlib/contrib/minizip/configure.ac
deleted file mode 100644
index 5b11970977..0000000000
--- a/deps/zlib/contrib/minizip/configure.ac
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com])
-AC_CONFIG_SRCDIR([minizip.c])
-AM_INIT_AUTOMAKE([foreign])
-LT_INIT
-
-AC_MSG_CHECKING([whether to build example programs])
-AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs]))
-AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes])
-if test "$enable_demos" = yes
-then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-case "${host}" in
- *-mingw* | mingw*)
- WIN32="yes"
- ;;
- *)
- ;;
-esac
-AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
-
-
-AC_SUBST([HAVE_UNISTD_H], [0])
-AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
-AC_CONFIG_FILES([Makefile minizip.pc])
-AC_OUTPUT
diff --git a/deps/zlib/contrib/minizip/ioapi.c b/deps/zlib/contrib/minizip/ioapi.c
index 7f5c191b2a..543910b5e1 100644
--- a/deps/zlib/contrib/minizip/ioapi.c
+++ b/deps/zlib/contrib/minizip/ioapi.c
@@ -14,7 +14,7 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
+#if defined(__APPLE__) || defined(__Fuchsia__) || defined(IOAPI_NO_64)
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftello(stream)
diff --git a/deps/zlib/contrib/minizip/ioapi.h b/deps/zlib/contrib/minizip/ioapi.h
index 8dcbdb06e3..c1b7a54847 100644
--- a/deps/zlib/contrib/minizip/ioapi.h
+++ b/deps/zlib/contrib/minizip/ioapi.h
@@ -43,7 +43,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#if defined(USE_FILE32API)
#define fopen64 fopen
diff --git a/deps/zlib/contrib/minizip/iowin32.c b/deps/zlib/contrib/minizip/iowin32.c
index 274f39eb1d..246ceb91a1 100644
--- a/deps/zlib/contrib/minizip/iowin32.c
+++ b/deps/zlib/contrib/minizip/iowin32.c
@@ -26,12 +26,19 @@
#endif
+#ifdef _WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x601
+#endif
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
// see Include/shared/winapifamily.h in the Windows Kit
#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
#define IOWIN32_USING_WINRT_API 1
#endif
#endif
+#endif
voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode));
uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
diff --git a/deps/zlib/contrib/minizip/make_vms.com b/deps/zlib/contrib/minizip/make_vms.com
deleted file mode 100644
index 9ac13a98fa..0000000000
--- a/deps/zlib/contrib/minizip/make_vms.com
+++ /dev/null
@@ -1,25 +0,0 @@
-$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig
-$ open/write zdef vmsdefs.h
-$ copy sys$input: zdef
-$ deck
-#define unix
-#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from
-#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator
-#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord
-#define Write_EndOfCentralDirectoryRecord Write_EoDRecord
-$ eod
-$ close zdef
-$ copy vmsdefs.h,ioapi.h_orig ioapi.h
-$ cc/include=[--]/prefix=all ioapi.c
-$ cc/include=[--]/prefix=all miniunz.c
-$ cc/include=[--]/prefix=all unzip.c
-$ cc/include=[--]/prefix=all minizip.c
-$ cc/include=[--]/prefix=all zip.c
-$ link miniunz,unzip,ioapi,[--]libz.olb/lib
-$ link minizip,zip,ioapi,[--]libz.olb/lib
-$ mcr []minizip test minizip_info.txt
-$ mcr []miniunz -l test.zip
-$ rename minizip_info.txt; minizip_info.txt_old
-$ mcr []miniunz test.zip
-$ delete test.zip;*
-$exit
diff --git a/deps/zlib/contrib/minizip/miniunzip.1 b/deps/zlib/contrib/minizip/miniunzip.1
deleted file mode 100644
index 111ac69190..0000000000
--- a/deps/zlib/contrib/minizip/miniunzip.1
+++ /dev/null
@@ -1,63 +0,0 @@
-.\" Hey, EMACS: -*- nroff -*-
-.TH miniunzip 1 "Nov 7, 2001"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh disable hyphenation
-.\" .hy enable hyphenation
-.\" .ad l left justify
-.\" .ad b justify to both left and right margins
-.\" .nf disable filling
-.\" .fi enable filling
-.\" .br insert line break
-.\" .sp <n> insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-miniunzip - uncompress and examine ZIP archives
-.SH SYNOPSIS
-.B miniunzip
-.RI [ -exvlo ]
-zipfile [ files_to_extract ] [-d tempdir]
-.SH DESCRIPTION
-.B minizip
-is a simple tool which allows the extraction of compressed file
-archives in the ZIP format used by the MS-DOS utility PKZIP. It was
-written as a demonstration of the
-.IR zlib (3)
-library and therefore lack many of the features of the
-.IR unzip (1)
-program.
-.SH OPTIONS
-A number of options are supported. With the exception of
-.BI \-d\ tempdir
-these must be supplied before any
-other arguments and are:
-.TP
-.BI \-l\ ,\ \-\-v
-List the files in the archive without extracting them.
-.TP
-.B \-o
-Overwrite files without prompting for confirmation.
-.TP
-.B \-x
-Extract files (default).
-.PP
-The
-.I zipfile
-argument is the name of the archive to process. The next argument can be used
-to specify a single file to extract from the archive.
-
-Lastly, the following option can be specified at the end of the command-line:
-.TP
-.BI \-d\ tempdir
-Extract the archive in the directory
-.I tempdir
-rather than the current directory.
-.SH SEE ALSO
-.BR minizip (1),
-.BR zlib (3),
-.BR unzip (1).
-.SH AUTHOR
-This program was written by Gilles Vollant. This manual page was
-written by Mark Brown <broonie@sirena.org.uk>. The -d tempdir option
-was added by Dirk Eddelbuettel <edd@debian.org>.
diff --git a/deps/zlib/contrib/minizip/minizip.1 b/deps/zlib/contrib/minizip/minizip.1
deleted file mode 100644
index 1154484c1c..0000000000
--- a/deps/zlib/contrib/minizip/minizip.1
+++ /dev/null
@@ -1,46 +0,0 @@
-.\" Hey, EMACS: -*- nroff -*-
-.TH minizip 1 "May 2, 2001"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh disable hyphenation
-.\" .hy enable hyphenation
-.\" .ad l left justify
-.\" .ad b justify to both left and right margins
-.\" .nf disable filling
-.\" .fi enable filling
-.\" .br insert line break
-.\" .sp <n> insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-minizip - create ZIP archives
-.SH SYNOPSIS
-.B minizip
-.RI [ -o ]
-zipfile [ " files" ... ]
-.SH DESCRIPTION
-.B minizip
-is a simple tool which allows the creation of compressed file archives
-in the ZIP format used by the MS-DOS utility PKZIP. It was written as
-a demonstration of the
-.IR zlib (3)
-library and therefore lack many of the features of the
-.IR zip (1)
-program.
-.SH OPTIONS
-The first argument supplied is the name of the ZIP archive to create or
-.RI -o
-in which case it is ignored and the second argument treated as the
-name of the ZIP file. If the ZIP file already exists it will be
-overwritten.
-.PP
-Subsequent arguments specify a list of files to place in the ZIP
-archive. If none are specified then an empty archive will be created.
-.SH SEE ALSO
-.BR miniunzip (1),
-.BR zlib (3),
-.BR zip (1).
-.SH AUTHOR
-This program was written by Gilles Vollant. This manual page was
-written by Mark Brown <broonie@sirena.org.uk>.
-
diff --git a/deps/zlib/contrib/minizip/minizip.pc.in b/deps/zlib/contrib/minizip/minizip.pc.in
deleted file mode 100644
index 69b5b7fdcb..0000000000
--- a/deps/zlib/contrib/minizip/minizip.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/minizip
-
-Name: minizip
-Description: Minizip zip file manipulation library
-Requires:
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lminizip
-Libs.private: -lz
-Cflags: -I${includedir}
diff --git a/deps/zlib/contrib/minizip/mztools.c b/deps/zlib/contrib/minizip/mztools.c
index 96891c2e0b..8bf9cca326 100644
--- a/deps/zlib/contrib/minizip/mztools.c
+++ b/deps/zlib/contrib/minizip/mztools.c
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#include "unzip.h"
#define READ_8(adr) ((unsigned char)*(adr))
diff --git a/deps/zlib/contrib/minizip/mztools.h b/deps/zlib/contrib/minizip/mztools.h
index a49a426ec2..f295ffeda6 100644
--- a/deps/zlib/contrib/minizip/mztools.h
+++ b/deps/zlib/contrib/minizip/mztools.h
@@ -12,7 +12,7 @@ extern "C" {
#endif
#ifndef _ZLIB_H
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#endif
#include "unzip.h"
diff --git a/deps/zlib/contrib/minizip/unzip.c b/deps/zlib/contrib/minizip/unzip.c
index bcfb9416ec..e8b2bc5c76 100644
--- a/deps/zlib/contrib/minizip/unzip.c
+++ b/deps/zlib/contrib/minizip/unzip.c
@@ -68,11 +68,7 @@
#include <stdlib.h>
#include <string.h>
-#ifndef NOUNCRYPT
- #define NOUNCRYPT
-#endif
-
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#include "unzip.h"
#ifdef STDC
@@ -1630,6 +1626,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
zdecode(s->keys,s->pcrc_32_tab,source[i]);
s->pfile_in_zip_read->pos_in_zipfile+=12;
+ s->pfile_in_zip_read->rest_read_compressed-=12;
s->encrypted=1;
}
# endif
@@ -1705,11 +1702,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
pfile_in_zip_read_info->stream.avail_out = (uInt)len;
- if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
- (!(pfile_in_zip_read_info->raw)))
- pfile_in_zip_read_info->stream.avail_out =
- (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
-
if ((len>pfile_in_zip_read_info->rest_read_compressed+
pfile_in_zip_read_info->stream.avail_in) &&
(pfile_in_zip_read_info->raw))
diff --git a/deps/zlib/contrib/minizip/unzip.h b/deps/zlib/contrib/minizip/unzip.h
index 2104e39150..3c0143529b 100644
--- a/deps/zlib/contrib/minizip/unzip.h
+++ b/deps/zlib/contrib/minizip/unzip.h
@@ -48,7 +48,7 @@ extern "C" {
#endif
#ifndef _ZLIB_H
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#endif
#ifndef _ZLIBIOAPI_H
diff --git a/deps/zlib/contrib/minizip/zip.c b/deps/zlib/contrib/minizip/zip.c
index 44e88a9cb9..65c0c72518 100644
--- a/deps/zlib/contrib/minizip/zip.c
+++ b/deps/zlib/contrib/minizip/zip.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#include "zip.h"
#ifdef STDC
diff --git a/deps/zlib/contrib/minizip/zip.h b/deps/zlib/contrib/minizip/zip.h
index 8aaebb6234..8c06c0aa7b 100644
--- a/deps/zlib/contrib/minizip/zip.h
+++ b/deps/zlib/contrib/minizip/zip.h
@@ -47,7 +47,7 @@ extern "C" {
//#define HAVE_BZIP2
#ifndef _ZLIB_H
-#include "zlib.h"
+#include "third_party/zlib/zlib.h"
#endif
#ifndef _ZLIBIOAPI_H