Commit Graph

181 Commits

Author SHA1 Message Date
Nathan Moinvaziri
dd808239dd Fixed zip slip vulnerability in example app. #268 2018-06-11 07:38:58 -07:00
Nathan Moinvaziri
7bdfbf4699 Version 2.3.3. 2018-06-10 09:09:07 -07:00
Nathan Moinvaziri
30e859be0b Version 2.3.2. 2018-05-29 08:48:05 -07:00
Nathan Moinvaziri
0388124aad Simplify parsing of filename from path. 2018-05-09 20:03:26 -07:00
Nathan Moinvaziri
e1aad8c445 Version 2.3.1. 2018-05-09 19:48:55 -07:00
Nathan Moinvaziri
3431a6635b Fixed more compiler warnings. #263 2018-05-06 16:59:31 -07:00
Nathan Moinvaziri
a4b83e8e95 Version 2.3.0. 2018-05-03 17:59:04 -07:00
Nathan Moinvaziri
37ceb026db
Merge branch 'dev' into ws2 2018-05-02 20:09:25 -07:00
Nathan Moinvaziri
3ad1a92279 Append slash to directories for compatibility. #257 2018-05-02 13:04:41 -07:00
Viktor Szakats
447dd06750 whitespace fixes
- remove line-ending spaces
- always have a file-ending newline
- remove duplicate file-ending newlines
2018-05-02 19:59:38 +00:00
Nathan Moinvaziri
bb3b75bc09 Fixed directory compression method.
Move zip attribute detection to mz_zip. #257
2018-05-02 10:48:51 -07:00
Nathan Moinvaziri
9a3ae75a48 Fixed print out of directories. #257 2018-05-02 09:54:44 -07:00
Nathan Moinvaziri
4a41245099 Added msdos host system and dir detection. 2018-05-02 09:24:09 -07:00
Nathan Moinvaziri
8d8deb4e5d Added listing of attributes. 2018-05-01 21:54:15 -07:00
Nathan Moinvaziri
0619c3e6c4 Merge branch 'dev' of https://github.com/nmoinvaz/minizip into dev 2018-05-01 13:51:13 -07:00
Nathan Moinvaziri
e33916b608 Added support for directory entries in minizip. #257
Added support for file attributes.
2018-05-01 13:45:08 -07:00
Viktor Szakats
915b82e95b remove whitespace @ eol 2018-04-24 10:02:39 +00:00
Nathan Moinvaziri
ad8e3dd4b1 Version 2.2.9. 2018-04-18 20:54:52 -07:00
Nathan Moinvaziri
a43eb98099 Remove src directory. 2018-03-27 20:37:53 -07:00
Nathan Moinvaziri
84bae188b6 Move rest of source files to src dir. 2017-10-16 19:31:24 -07:00
Nathan Moinvaziri
77008c6344 Fixed problems extracting to a directory after change_dir was removed.
Consolidated all the path building to use mz_path_combine.
Fixed bug in minizip when using mz_zip_write_entry.
Created structs in minizip and miniunz for keeping all options together.
Fixed bug reading end of zip when using split stream.
Fixed large file support in win32.
2017-10-16 14:50:31 -07:00
Nathan Moinvaziri
00cca9f511 Made PKWARE traditional encryption optional.
Added support for disk splitting into the minizip and miniunz sample apps.
Removed change_dir function from os helpers since it is no longer needed and changing dir causes problems when trying to find the next split archive.
Cleaned up #defines and pushed more into mz.h which was previously named mz.h
Removed NOUNCRYPT and NOCRYPT and instead implemented HAVE_CRYPT which can be configured via CMake USE_CRYPT.
Fixed issues unzipping non-split archives.
Fixed return value on mz_zip_entry_write.
2017-10-16 07:37:11 -07:00
Nathan Moinvaziri
af2daca4a1 Fixed issues with zip64 not being written in local header.
Modified split writing to stop creating disks after central dir.
Renamed method #defines.
2017-10-10 10:05:20 -07:00
Nathan Moinvaziri
d83efdc614 Added back function to recursively create dirs.
Fixed issue extracting files that have dirs in them.
Added unit test for directory zipping/unzipping.
2017-10-09 00:40:53 -07:00
Nathan Moinvaziri
f95664a4e2 Fixed compiler error with missing param. 2017-10-08 23:35:46 -07:00
Nathan Moinvaziri
fd83d0d4a3 Added platform defined version_madeby values. 2017-10-06 00:20:05 -07:00
Nathan Moinvaziri
40df94bafb Merge pull request #172 from Coeur/guard_path
guarding from missing path
2017-10-06 00:12:34 -07:00
Nathan Moinvaziri
fce8e4c2fd Fixed compilation errors on Windows. 2017-10-06 00:08:29 -07:00
Nathan Moinvaziri
0c9660b83f Fixed compilation on mac. 2017-10-06 00:02:28 -07:00
Nathan Moinvaziri
4f697ee0de Fixed incorrect function return value for readdir. 2017-10-05 23:55:59 -07:00
Nathan Moinvaziri
aa323f508d Added ability for minizip cmd tool to add directories to zip files.
Split out os specific functions into their own files instead of as part of stream.
2017-10-05 23:32:57 -07:00
Nathan Moinvaziri
9145c949cc Fixed mac compiler errors and warnings. 2017-10-05 21:02:36 -07:00
Antoine Cœur
3ffbf2f6bc guarding from missing path 2017-10-06 11:43:21 +08:00
Nathan Moinvaziri
973457dac8 Added LZMA, BZIP2, and AES command line params to zip cmd tool.
Clean up some logic in the zip cmd tool.
Fixed zipping to non-existant directory.
Fixed passthru stream shouldn't open or close base streams.
Changed make_dir functions to succeed if dir exists.
Fixed compression method check for zip open functions.
Fixed wrong level being passed to bzip2.
Removed unused price_tablegen.c.
Updated CMakeLists.
Added travis yml.
2017-10-05 18:45:23 -07:00
Nathan Moinvaziri
45837b5cef Added version information to header comments. 2017-10-05 07:34:59 -07:00
Nathan Moinvaziri
3f1b363cb4 Fixed date in some headers.
Updated readme.
2017-10-04 22:50:20 -07:00
Nathan Moinvaziri
4166027081 Removed path param from open functions.
Removed mode parameter from zip open function.
Updated buffered io example in readme.
Removed compatibility layer.
2017-10-04 22:36:29 -07:00
Nathan Moinvaziri
41cfdcb45f Fixed includes. 2017-10-04 22:10:11 -07:00
Nathan Moinvaziri
a9b8cd886c Moved stream opening/closing outside of zip and unzip classes.
Fixed issues when password required for zip.
Added more checks for invalid params.
2017-10-04 21:59:39 -07:00
Nathan Moinvaziri
900129bc1c Added LZMA compression.
Cleaned up minizip app.
Removed prng from aes since our random generator should be cryptographically secure.
Removed old change log - it is in the git history now.
Added bzip2 license.
2017-10-04 20:06:25 -07:00
Nathan Moinvaziri
5ef60a2b39 Get rid of shared file moved all the code to mzstrm.
Converted miniunz to use new library changes.
2017-10-03 23:19:37 -07:00
Nathan Moinvaziri
4138ca5144 Refactored unzip functionality. 2017-10-03 21:56:07 -07:00
Nathan Moinvaziri
0a592082d0 Added bzip2 compression back in.
Added test stream functions.
Refactored zip library.
2017-10-02 22:11:03 -07:00
Nathan Moinvaziri
3624400b08 Started using streams in zip.c. 2017-10-02 00:44:51 -07:00
Nathan Moinvaziri
d2a1a12ac5 Rename files.
Clean up includes and comments.
2017-10-01 22:42:35 -07:00
Nathan Moinvaziri
42801b8fb0 Rename functions and definitions. 2017-10-01 21:43:24 -07:00
Nathan Moinvaziri
74f8c7a6b1 Added traditional encryption stream.
Broke out random encryption code into platform specific stream code.
Cleanup other streams.
2017-10-01 20:33:01 -07:00
Nathan Moinvaziri
a4f2ea02ed Modified crc stream to not open or close base stream. 2017-09-29 21:15:08 -07:00
Nathan Moinvaziri
94611f11d4 Rework the streams. 2017-09-29 21:02:09 -07:00
Antoine Cœur
46aaa79601 updated copyright and version 2017-09-16 13:25:02 +08:00
Antoine Cœur
c99950325e updating minizip info 2017-07-25 12:37:14 +08:00
Nathan Moinvaziri
0bbf1fecd7 Added support for InfoZip's modification to ZipCrypto format when using data descriptors. 2017-07-23 21:36:08 -07:00
Nathan Moinvaziri
edf591bfdb Added qbs projects. (Issue #105)
Fixed warnings on linux.
2017-04-18 10:59:42 -07:00
Nathan Moinvaziri
c798d49c52 Removed zipCloseFileInZipRaw and zipCloseFileInZipRaw64 since they are no longer necessary.
Use zip64 if pos_local_header is greater than UINT32_MAX.
Use data descriptor exclusively and write it correctly with Zip64 format.
Don't write zip64 local extra info since we use data descriptor instead.
Write data descriptor signature.
Cleaned up some logic.
2017-03-31 10:47:14 -07:00
Nathan Moinvaziri
243131f49a Split adding zip functionality into its own function. 2017-03-18 17:07:05 -07:00
Nathan Moinvaziri
eac67eadf4 Fixed formatting. 2017-03-18 16:32:30 -07:00
Nathan Moinvaziri
e24ed8db12 Code cleanup. 2017-03-18 16:16:06 -07:00
Nathan Moinvaziri
a65468976f Removed unnecessary preprocessor macros. 2017-03-04 10:01:10 -08:00
Nathan Moinvaziri
4790ea8d4f Cleanup. 2016-10-10 00:26:42 -07:00
Nathan Moinvaziri
7e5f2c7f9c Fixed MAXFILENAME compiler error. 2016-10-09 21:37:56 -07:00
Nathan Moinvaziri
28ad5bf4fb Moved shared minizip/miniunz functionality into minishared. (#57)
Moved dos time/date conversion functionality out of zip.c and unzip.c.
2016-10-09 21:34:17 -07:00
Nathan Moinvaziri
aa4758baea Implement standard integer types.
Remove old OF() define.
2016-10-09 20:09:50 -07:00
Denis Vasilevsky
306694e594 Some issues fixed for Apple LLVM Compiler (Xcode default compiler) 2016-09-28 18:13:22 +03:00
Nathan Moinvaziri
39c3be2de3 Fix formatting. 2015-12-12 01:56:38 -07:00
Nathan Moinvaziri
46a45fdcd3 Fixed bug in command line parsing. (Issue #23) 2015-06-17 13:11:04 -07:00
Andy Maloney
713f8f9354 - remove unused variables
- fix two potential memory leaks
2014-08-30 14:34:55 -04:00
Peter Wang
b109b1c936 Avoid non-C90 comments in some sources.
In case you need to compile with gcc -pedantic or similar.
2014-03-07 10:59:19 +11:00
Nathan Moinvaziri
c680ad315c Cleaned up source header comments
Fixed indentation of preprocessor statements
2014-01-12 14:04:54 -07:00
Nathan Moinvaziri
aea0ac41b7 Fix formatting of preprocessor defines 2014-01-07 19:13:14 -07:00
João Eiras
ff62d718ca Fix compile issues
And whitespace.
2013-12-18 14:55:41 +01:00
João Eiras
b61a5a821f Removed trailing whitespace.
(commit contains only whitespace changes)
2013-12-18 14:55:38 +01:00
Nathan Moinvaziri
591e1002d0 fixed formatting 2012-10-25 02:07:40 -07:00
Nathan Moinvaziri
4475203a3c more cleanup and simplification 2012-10-25 01:49:35 -07:00
Nathan Moinvaziri
4d98689c0e fix use of opt_overwrite 2012-10-25 00:40:28 -07:00
Nathan Moinvaziri
12fd286f20 fixed bug in logic for skipping command line options
print errors
more cleanup
2012-10-25 00:36:46 -07:00
Nathan Moinvaziri
c2780b8e51 more simplification and cleanup 2012-10-25 00:29:35 -07:00
Nathan Moinvaziri
0deccb8070 cleanup and simplify zip example 2012-10-25 00:21:50 -07:00
Nathan Moinvaziri
8979390ca7 fixed warnings 2012-07-14 16:45:49 -07:00
Nathan Moinvaziri
d2368718ee latest changes from gvollant 2012-01-21 15:12:36 -07:00
Nathan Moinvaziri
6d35b6b884 added pkware disk spanning support 2012-01-21 15:10:18 -07:00
Nathan Moinvaziri
35c6102e21 zlib 1.2.5 2012-01-21 14:53:44 -07:00