26 Commits

Author SHA1 Message Date
Andrius Mitkus
71ba5d12d6 Avoid NULL ptr arithmetic UB 2022-02-09 09:48:30 +03:00
Martin
12b78b6d5a Fix function definitions
Fix function definitions tdefl_compressor_alloc(void) and
tinfl_decompressor_alloc(void) to not accept any amount of arguments.
2021-11-28 18:36:40 +01:00
Martin Raiber
82d6810a38 Merge pull request #193 from ccawley2011/no-inflate-deflate
Add MINIZ_NO_DEFLATE_APIS and MINIZ_NO_INFLATE_APIS
2021-11-11 21:36:53 +01:00
Cameron Cawley
9b89689723 Add MINIZ_NO_DEFLATE_APIS and MINIZ_NO_INFLATE_APIS 2021-07-20 20:19:32 +01:00
Cameron Cawley
78ae375016 Fix "'&array' may not produce intended result" warnings with OpenWatcom
Co-authored-by: sezero <sezero@users.noreply.github.com>
2021-07-20 18:08:11 +01:00
Martin Raiber
0c905aec41 Merge pull request #169 from ashtul/patch-1
remove redundant condition
2021-06-27 21:28:00 +02:00
Andre Maroneze
cf2833fdc1 avoid use of uninitialized value in tdefl_record_literal
In tdefl_record_literal, the following expression may read an uninitialized
value in the m_pLZ_flags field:

*d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1);

By explicitly initializing it, we avoid possible undefined behaviors.
Issue found with Frama-C.
2021-05-25 15:23:39 +02:00
ariel shtul
8410f3c640 remove redundant condition
L#1067 asserts that (match_len >= TDEFL_MIN_MATCH_LEN)
2020-11-01 12:02:06 +02:00
tamasmeszaros
d57872c77a Fix for older cmake versions and build of examples. 2019-06-03 10:02:13 +02: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
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
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
Martin
84e8458de0 Option to use memcpy for unaligned data access 2017-05-18 18:47:09 +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
Michał Janiszewski
a6a989cc18 clang-format the sources 2017-03-23 08:50:08 +01:00
Martin
1c6ca868d7 Fix compilation with the various omission compile definitions 2017-03-13 19:38:42 +01:00
Martin
3b7ee5aea5 Fix compile warnings 2017-01-19 15:53:53 +01:00
Martin
4c36ab0230 Rerun clang-format 2017-01-03 01:30:38 +01:00
Martin
8e30365e91 Fix compile issues with "gcc -ansi" 2016-11-27 22:19:38 +01:00
Martin
224d207ce8 MiniZ ZIP64 was part of valve vogl which is MIT licensed 2016-11-21 18:17:47 +01:00
Matthew Sitton
3979a6de1f And finally Integrate vogl changes. 2016-06-25 12:13:28 -05:00
Matthew Sitton
11f1380c45 Some more formatting issues. 2016-06-25 12:03:49 -05:00
Matthew Sitton
d650d15974 Add vogl .clang-format and reformat library source. 2016-06-25 09:03:56 -05:00
Matthew Sitton
baa0e214e7 Add v1.16 beta r1 changes. 2016-06-25 08:02:20 -05:00
Matthew Sitton
724de0bb0f Separate the into multiple files similar to the vogl zip64 version of the library.
If anyone wants to have a minified version of if a script could be written to do this automatically.
2016-06-25 06:43:30 -05:00