LemonBoy
d76fb8c1e0
Merge 7e1c3c97c0 into 0c30a001bc
2024-12-30 14:12:27 +05:30
Martin Raiber
0c30a001bc
Merge pull request #329 from iibclothier/master
...
Remedy CVE-2018-12913
2024-12-29 22:45:57 +01:00
iibclothier
8980137de6
Merge pull request #1 from iibclothier/fix_cifuzz_yml
...
Update ci-fuzz.yml
2024-12-28 11:45:33 -06:00
iibclothier
4d99a8f7c2
Update ci-fuzz.yml
...
Try version 4
2024-12-28 11:24:41 -06:00
iibclothier
13c4e52c91
Update ci-fuzz.yml
...
Version 1 is deprecated, bump to version 2.
2024-12-28 11:18:43 -06:00
iibclothier
d9be48fbe6
Fix formatting
2024-12-18 08:16:26 -06:00
iibclothier
3a404922aa
Merge branch 'Branch_3.0.2'
...
# Conflicts:
# miniz_tinfl.c
2024-12-18 08:12:02 -06:00
iibclothier
e680017bae
Add a check to guard against potential infinite loop when given a bad zip file. See https://github.com/Edward-L/my-cve-list/blob/master/miniz/README.md
...
and https://nvd.nist.gov/vuln/detail/CVE-2018-12913 for details.
2024-12-18 08:04:53 -06:00
Martin
2fa13ca8a3
Replace defines with function wrappers etc. as much as possible
2024-12-06 21:30:49 +01:00
Martin Raiber
0f4cbb8c27
Merge pull request #325 from tyler92/add-in-place-fuzzer
...
Add fuzzer for mz_zip_add_mem_to_archive_file_in_place function
2024-11-17 23:49:18 +01:00
Mikhail Khachayants
efbf3935b1
Add fuzzer for mz_zip_add_mem_to_archive_file_in_place function
2024-11-17 22:48:27 +02:00
Martin Raiber
35528ad769
Merge pull request #316 from zhaozg/fix/stdio
...
cmake: new option BUILD_NO_STDIO to enable MINIZ_NO_STDIO
2024-10-17 20:11:01 +02:00
zhaozg
189f56edaa
cmake: new option BUILD_NO_STDIO to enable MINIZ_NO_STDIO
2024-10-17 11:27:24 +08:00
Martin
11e7c39508
Avoid fdreopen if possible
...
Avoid using fdropen in mz_zip_add_mem_to_archive_file_in_place or
if new flag MZ_ZIP_FLAG_READ_ALLOW_WRITING is set.
This improves performance, but also fdreopen is broken on Android
(some kind of race).
2024-10-16 23:07:29 +02:00
Martin Raiber
1ff82be7d6
Cast enum value to int
2024-08-05 10:46:09 +02:00
Martin Raiber
8e8e609e02
Re-use types from stdint.h
2024-08-05 10:45:42 +02:00
LemonBoy
7e1c3c97c0
Set "Made By" in the Central Directory
...
Same as it's already done for Zip64.
2024-07-10 13:47:30 +02:00
Martin Raiber
bf7a1f0a5a
Merge pull request #315 from zhaozg/master
...
fix ops detect for MZ_ZIP_TYPE_USER
2024-07-09 23:07:05 +02:00
Martin Raiber
4000bc3a87
Update c-cpp.yml
2024-07-09 22:49:42 +02:00
zhaozg
200c9053d0
fix ops detect for MZ_ZIP_TYPE_USER
2024-07-09 15:35:28 +08:00
Martin Raiber
8573fd7cd6
Merge pull request #310 from LemonBoy/fuzzer-fix
...
Two small fixes
2024-06-10 22:26:59 +02:00
LemonBoy
961de84cbb
Limit the archive offset detection to files
...
It makes sense to avoid changing the offset and/or the archive size when
the user specifies a buffer rather than a file.
2024-06-10 11:57:36 +02:00
LemonBoy
0283a1796e
Guard against malformed input files
...
Ensure the archive start offset can never be negative.
Fixes a case found by OSSFuzz.
2024-06-10 11:56:48 +02:00
Martin Raiber
3c46a05141
Merge pull request #309 from LemonBoy/zip-offset
...
Support Zip archives not starting at zero offset
2024-06-09 21:50:49 +02:00
LemonBoy
43bc679d05
Support Zip archives not starting at zero offset
...
Zip archives are usually read from the back to the front, making it
possible to append them to other files (e.g. executables) in order to
provide some kind of embedded filesystem.
We can actually extract the start of the archive by looking at the
central directory offset, by comparing the specified and the actual file
offset.
The Zip64 format adds another challenge as the EOCD locator specifies
the offset to the EOCD starting from the beginning of the archive. Such
relative offset cannot be directly used for archives not starting at
position zero, hence the addition of another step that tries to locate
the 64bit EOCD right before the EOCD locator. The added overhead is
pretty small (and could be made smaller by reading both the presumed
EOCD and EOCD locator at once) and works pretty well for 90% of the
archives I've tested it with, if that heuristic fails the old behaviour
is preserved.
2024-06-01 11:48:07 +02:00
Martin
8714fd3cd8
Format code with clang-format
2024-05-16 21:24:56 +02:00
Martin Raiber
60ec4a72b9
Merge pull request #305 from rojer/warnings
...
Fix unused arg warnings when building with MINIZ_NO_TIME
2024-05-16 21:05:51 +02:00
Martin Raiber
3cc84f4f0c
Merge pull request #306 from rojer/lm_redefine
...
Do not redefine TDEFL_LESS_MEMORY if already defined
2024-05-16 21:05:24 +02:00
Deomid rojer Ryabkov
2552e6d45a
Do not redefine TDEFL_LESS_MEMORY if already defined
2024-03-23 19:57:23 +00:00
Deomid rojer Ryabkov
622aea128a
Fix unused arg warnings when building with MINIZ_NO_TIME
2024-03-23 19:55:43 +00:00
Martin Raiber
16413c213d
Merge pull request #299 from DavidKorczynski/fix-fuzzer-build
...
Fix OSS-Fuzz build
2024-01-06 11:53:43 +01:00
David Korczynski
a77af68d92
fix OSS-Fuzz build
...
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64398
Signed-off-by: David Korczynski <david@adalogics.com>
2024-01-02 03:16:18 -08:00
Martin Raiber
e5700656b3
Merge pull request #287 from Wertzui123/Wertzui123-patch-1
...
Don't redefine `WIN32_LEAN_AND_MEAN` if already defined
2023-11-19 21:09:11 +01:00
Martin Raiber
4d6f89cb0a
Merge pull request #288 from jpcha2/master
...
Remove parameter check in `tinfl_decompress` that breaks `tinfl_decompress_mem_to_heap`
2023-11-19 20:57:40 +01:00
Martin
f8a09fe199
Fix step description
2023-11-19 20:55:38 +01:00
Martin
6cfbb0d1d8
Fix preset file
2023-11-19 20:54:09 +01:00
Martin
fa8ef4584b
Fix preset file
2023-11-19 20:52:45 +01:00
Martin
039b1d2962
Use unix makefiles generator
2023-11-19 20:50:45 +01:00
Martin Raiber
32bb60d989
Update c-cpp.yml
2023-11-19 20:47:38 +01:00
Martin
05ab4dc05c
Add some catch2 tests
2023-11-19 20:45:17 +01:00
Martin
697f010d70
Revert parameter check
...
Check breaks tinfl_decompress_mem_to_heap
2023-11-19 20:27:07 +01:00
John Paul Chacha
bd9e22f577
Merge pull request #2 from jpcha2/jpcha2-patch-1-param-check-tinfl_decompress
...
Update miniz_tinfl.c to remove parameter check that breaks tinfl_decompress_mem_to_heap()
2023-10-09 09:20:34 +03:00
John Paul Chacha
9aef68479f
Update miniz_tinfl.c
...
Remove parameter check that breaks tinfl_decompress_mem_to_heap() (see discussion on pull request #268 )
2023-10-09 08:39:00 +03:00
Wertzui123
69763e8811
Don't redefine WIN32_LEAN_AND_MEAN if already defined
2023-10-07 14:13:08 +02:00
Martin Raiber
18795fa61e
Merge pull request #286 from Sororfortuna/patch-1
...
Bump cmake minimum version
2023-09-28 20:07:39 +02:00
Martin Raiber
96b0c0fc64
Merge pull request #266 from fabiangreffrath/lfs_linux64
...
Fix missing large file support warning on 64-bit Linux
2023-09-28 20:07:21 +02:00
Martin Raiber
acfba6a21d
Merge pull request #280 from nyq/nyq-s_tdefl_num_probes-cpp
...
Update miniz_tdef.c to enable compiling in forced-C++ mode
2023-09-28 20:05:56 +02:00
Martin Raiber
93ded54847
Merge pull request #282 from nyq/nyq-fix-version-in-comment
...
Update miniz.h to correctly reflect release version in the title comment
2023-09-28 20:03:00 +02:00
Martin Raiber
a23a38bf53
Merge pull request #283 from nyq/nyq-fix-min-max-conflicts
...
Prevent min/max conflicts between windows.h and std namespace
2023-09-28 20:00:07 +02:00
Igor Alexey
d0190e5cdf
bump cmake minimum version
2023-09-28 09:01:25 -03:00