Commit Graph

268 Commits

Author SHA1 Message Date
Francesc Alted
96f0da1db9 Yet another fix 2019-03-06 14:34:39 +01:00
Francesc Alted
93c6567773 More fixes for MSVC 2019-03-06 14:07:45 +01:00
Francesc Alted
2b45f89867 Fix a MSVC 2013 warning 2019-03-06 09:51:03 +01:00
Andreas Stefl
5c62e23e04 use target_include_directories 2019-03-03 19:35:13 +01:00
Martin Raiber
f3461d636a Merge pull request #109 from mcgouganp/master
Fix large file support under Windows
2019-01-23 17:44:13 +01:00
paul
45a080c050 Fix large file support under Windows
Under Windows _stat maps to _stat64i32 which only supports max int32_t file sizes.
Change to _stat64 which uses 64bit file sizes and file modification times.
2019-01-23 12:36:25 +10:00
Martin Raiber
2e15a3ff77 Merge pull request #107 from lumag/fix-alloc
Move comp/decomp alloc/free  prototypes under guarding #ifndef
2019-01-17 13:24:21 +01:00
Dmitry Eremin-Solenikov
d31e119d4d Move comp/decomp alloc/free prototypes under guarding #ifndef
Function implemenations are already guarded by #ifndef MZ_NO_MALLOC, so
let's put prototypes under the same #ifndef. Also, while we are at it,
make those prototypes standard-compliant by adding void argument.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
2019-01-17 12:52:11 +03:00
Martin Raiber
3a884afaa7 Merge pull request #106 from lumag/inflateReset
Implement inflateReset() function
2018-12-18 12:59:48 +01:00
Dmitry Eremin-Solenikov
ae423e65b4 Implement inflateReset() function
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
2018-12-18 14:26:37 +03:00
Martin Raiber
336fca3bd4 Merge pull request #105 from zdevito/master
guard memcpy when n == 0 because buffer may be NULL
2018-11-30 02:23:29 +01:00
Zach DeVito
a3ca94f833 guard memcpy when n == 0 because buffer may be NULL 2018-11-29 16:56:13 -08:00
Martin
9ce0d0ddff Fix out of bounds read while reading Zip64 extended information 2018-11-11 19:11:47 +01:00
Martin
f8600923fc Incremented version 2018-11-11 19:10:51 +01:00
Martin
306edd2022 New function to read files via callback functions when adding them 2018-11-11 19:10:35 +01:00
Martin
407d298c14 Remove inline for c90 support 2018-11-05 18:32:42 +01:00
Martin
53bfef515c More instances of memcpy instead of cast and use memcpy per default 2018-10-27 17:14:33 +02:00
Martin
91fa285a27 Fix grammar errors in ChangeLog 2018-10-27 17:12:43 +02:00
Martin
df65d5a1de Update ChangeLog 2.0.8 2018-09-19 12:48:59 +02:00
Martin
46cdde2ac5 Fix corrupt archive if uncompressed file smaller than 4 byte and file is added by mz_zip_writer_add_mem* 2018-07-10 22:31:13 +02:00
Martin
3616bf804b Fix heap overflow to user buffer in tinfl_status tinfl_decompress 2018-06-18 22:17:43 +02:00
Martin
76237898c0 Updated ChangeLog 2018-04-18 17:13:39 +02:00
Martin
3af5c82fd3 Add license, changelog, readme and example files to release zip 2018-04-18 17:12:44 +02:00
Martin
55f4dfe1d2 Incremented version 2018-04-18 17:09:01 +02:00
Martin
b344eaf775 Remove unimplemented functions 2018-04-18 16:50:36 +02:00
Martin
36b6c99f62 Incremented version 2.0.7 2018-02-20 19:03:53 +01:00
Martin
04f2169b8a Incremented version 2018-02-20 19:02:57 +01:00
Martin
14a5a1397b Merge branch 'master' of github.com:uroni/miniz 2018-02-20 19:00:19 +01:00
Martin
fef12d34f1 Remove _LARGEFILE64_SOURCE requirement from apple defines for large files 2018-02-20 18:58:32 +01:00
Martin Raiber
b01930542e Merge pull request #83 from arteniioleg/master
install library and headers
2017-11-30 12:52:09 +01:00
Martin Raiber
9c88e826a2 Merge pull request #82 from JonnyH/WIP/fix-default-level-mz_zip_writer_add_mem
Fix assert with mz_zip_writer_add_mem* w/MZ_DEFAULT_COMPRESSION
2017-11-30 12:51:58 +01:00
arteniioleg
22e4ef1b1d install library and headers 2017-11-23 14:25:55 +02:00
Jonathan Hamilton
7a7d0b423b Fix assert with mz_zip_writer_add_mem* w/MZ_DEFAULT_COMPRESSION
Issue #81

As MZ_DEFAULT_COMPRESSION is set as "-1", one of the bits is incorrectly
interpreted as the "MZ_ZIP_FLAG_COMPRESSED_DATA" flag before the check
for (flags < 0) intended to catch the MZ_DEFAULT_COMPRESION case.

This would then cause an assert() to be hit on any calls where the
uncomp_size is non-zero.

Moving the "Default" level check above any other flag checks should
solve this issue.
2017-11-23 00:22:24 -08:00
Martin Raiber
c17cc20c80 Merge pull request #3 from lockie/master
CMake improvements
2017-10-17 23:36:08 +02:00
Martin Raiber
0f6b199e5b Merge pull request #78 from coyote1357/master
Fix resource leak in mz_zip_reader_init_file_v2
2017-10-17 23:33:40 +02:00
T. Isaac Lightburn
0b7d3070b9 Fix resource leak in mz_zip_reader_init_file_v2
Was returning on error without closing file.
2017-10-12 21:29:43 -05:00
Martin Raiber
aadc405b1c Merge pull request #76 from jasonrohrer/master
Fixed loads of uninitilized value errors found with Valgrind by memse…
2017-09-02 16:17:53 +02:00
Jason Rohrer
02c51d3662 Fixed loads of uninitilized value errors found with Valgrind by memsetting m_dict to 0 in tdefl_init. 2017-08-28 18:28:14 -07:00
Andrew Kravchuk
9393a95f26 Removed need in C++ compiler in cmake build 2017-08-26 03:47:07 +03:00
Andrew Kravchuk
82e5b184e4 Fixed CMAKE_BUILD_TYPE default value 2017-08-26 00:03:50 +03:00
Martin
81df2df0f6 Document mz_zip_writer_init 2.0.6 2017-07-08 13:58:18 +02:00
Martin Raiber
64d92e19ad Merge pull request #66 from unsightlygod/iterative_decompression
Iterative decompression
2017-07-08 13:41:34 +02:00
Martin
404c574eba Define processor/arch macros as zero if not set to one 2017-07-08 13:37:05 +02:00
Martin
c1f791f81b Define processor/arch macros as zero if not set to one 2017-07-08 13:34:56 +02:00
Martin
c93e4d804c Increment version 2017-07-08 13:12:42 +02:00
Martin
84e8458de0 Option to use memcpy for unaligned data access 2017-05-18 18:47:09 +02:00
Phil Greenland
78cdcb0fce Include basic tests for iterative extraction method. 2017-05-14 12:04:54 +01:00
Phil Greenland
0d13890f4b Add "iterative" file extraction method based on mz_zip_reader_extract_to_callback. 2017-05-14 11:54:29 +01:00
Martin Raiber
7ecd1b3677 Merge pull request #65 from udda/fix-png-height
Fix PNG height
2017-05-05 00:14:57 +02:00
Mario Cianciolo
a0786b126d Fix PNG height
Fixed array index where to store image height.
PNG files made using `tdefl_write_image_to_png_file_in_memory_ex()` were very tall, with a huge empty area at the end.
Since `pnghdr[22]` was assigned twice, I changed indices to store height exactly in the way width is stored (two consecutive swapped bytes). Now PNG file height is correct.
2017-04-30 23:13:09 +02:00