2186 Commits

Author SHA1 Message Date
Nathan Moinvaziri
5aec551bf7 Fixed zstd master branch no longer working. 2024-04-01 09:44:11 -07:00
Nathan Moinvaziri
990f512941 Added permissions needed for codeql-action v3. 2024-03-06 08:54:18 -08:00
dependabot[bot]
3f9bb5ac2f Bump svenstaro/upload-release-action from 1.pre.release to 2.9.0
Bumps [svenstaro/upload-release-action](https://github.com/svenstaro/upload-release-action) from 1.pre.release to 2.9.0.
- [Release notes](https://github.com/svenstaro/upload-release-action/releases)
- [Changelog](https://github.com/svenstaro/upload-release-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svenstaro/upload-release-action/compare/v1-release...2.9.0)

---
updated-dependencies:
- dependency-name: svenstaro/upload-release-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 08:49:34 -08:00
dependabot[bot]
a8aa7542fb Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 08:48:29 -08:00
dependabot[bot]
0dbe04ceca Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 08:48:14 -08:00
dependabot[bot]
ab65b0b19b Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 08:48:02 -08:00
Nathan Moinvaziri
d26500513c Target develop branch for dependabot updates. 2024-03-05 19:36:27 -08:00
dependabot[bot]
59a32bd65b Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 19:33:45 -08:00
Nathan Moinvaziri
3eed562ef0 Version 4.0.5. 4.0.5 2024-03-05 19:30:16 -08:00
Nathan Moinvaziri
552b4831da Keep github actions up-to-date 2024-02-22 16:11:07 -08:00
Nathan Moinvaziri
168f9ffee7 Add empty directories to zip file. #756 2024-02-16 18:56:15 -08:00
Nathan Moinvaziri
0c3a741b36 Remove left over signing code from v3. 2024-02-16 18:32:53 -08:00
Nathan Moinvaziri
4bd8ebc090 Use correct version needed to extract for BZIP2. #763 2024-02-16 18:25:00 -08:00
Nathan Moinvaziri
32f91ade14 Add packaging status badge to readme. 2024-01-13 16:46:52 -08:00
rezso
e91cdbc485 Fix bz2 library name 2024-01-12 12:09:22 -05:00
Nathan Moinvaziri
a7d612adf2 Use hexadecimal prefix for MZ_VERSION_BUILD. #758 2024-01-04 10:05:59 -08:00
Nathan Moinvaziri
13b01a74a4 Version 4.0.4. 4.0.4 2023-12-29 07:05:05 -08:00
Yu SuiXian
d1f4d18899 Update comments style in various code files 2023-12-29 07:04:22 -08:00
Brad Smith
0211461993 Remove DOS line endings 2023-12-21 10:38:11 -08:00
Brad Smith
782b139ee7 Silence -Wunused-but-set-variable warnings
/home/brad/tmp/minizip-ng/mz_strm_zstd.c:110:13: warning: variable 'total_in' set but not used [-Wunused-but-set-variable]
    int32_t total_in = 0;
            ^

/home/brad/tmp/minizip-ng/mz_strm_bzip.c:117:13: warning: variable 'total_in' set but not used [-Wunused-but-set-variable]
    int32_t total_in = 0;
            ^
2023-12-18 10:13:55 -08:00
Brad Smith
487259b09a Silence MZ_COMPAT_VERSION warnings
In file included from /usr/local/include/minizip/unzip.h:11:
/usr/local/include/minizip/mz_compat.h:123:5: warning: 'MZ_COMPAT_VERSION' is not defined, evaluates to 0 [-Wundef]
    ^
2023-12-18 09:08:45 -08:00
Nathan Moinvaziri
bacf5122ac Fixed compat layer structures layout and types. #749 2023-12-17 09:45:33 -08:00
Nathan Moinvaziri
6c5f265a55 Added back unzLocateFile variant for minizip 1.2 with MZ_COMPAT_VERSION. 2023-12-17 09:34:25 -08:00
Tulio Magno Quites Machado Filho
fbd8443122 Fix unzLocateFile 3rd parameter
Replace the previous type with one that is compatible with an int in
order to be identical to the interface used in madler's zlib.

Fixes #745.
2023-12-11 13:47:31 -08:00
Hans Wennborg
2c2d6e5940 Reject overflows of zip header fields in minizip compat
This checks the lengths of the file name, and comment
that would be put in the zip headers, and rejects them if they are
too long. They are each limited to 65535 bytes in length by the zip
format. This also avoids possible buffer overflows if the provided
fields are too long.

See #736.
2023-12-05 19:05:15 -08:00
Nathan Moinvaziri
ef3ef9a4b8 Version 4.0.3. 4.0.3 2023-11-13 10:04:26 -08:00
Nathan Moinvaziri
933cedf2bb Added poc zip file for unzip fuzzer from GH issue #739. 2023-11-13 09:40:13 -08:00
pmqs
3417608874 Check for zero length path in mz_path_has_slash
Fix for https://github.com/zlib-ng/minizip-ng/issues/739
2023-11-13 09:38:50 -08:00
Nathan Moinvaziri
42b6b8997c Added poc zip file for unzip fuzzer from GH issue #740. 2023-11-13 09:37:41 -08:00
pmqs
3920698d13 Fix for filenames of the form "x/../y"
https://github.com/zlib-ng/minizip-ng/issues/740
2023-11-13 09:36:10 -08:00
Nathan Moinvaziri
97d8e65dc8 Match default compression level value in compress streams #726 2023-10-26 11:51:43 -07:00
Nathan Moinvaziri
1e9c6d8361 Use ZSTD compression level defaults. #726 2023-10-26 11:47:10 -07:00
Nathan Moinvaziri
2a5543a2b0 Fixed possible memory leak if realloc fails. 2023-10-26 11:42:53 -07:00
Nathan Moinvaziri
4f670cc7d7 Version 4.0.2. 4.0.2 2023-10-26 10:06:19 -07:00
pmqs
145754983c Get mz_dir_make to test for an empty path
fixes https://github.com/zlib-ng/minizip-ng/issues/737
2023-10-26 10:03:09 -07:00
Nico Rieck
26c484d7ce Fix lzma compression level #731
LZMA_PRESET_EXTREME is not a preset on its own but a flag which must be
used together with a level. The difference between level 9 with and without
the extreme flag also seems negligible, so this commit just passes through
the level and maps -1 and invalid values to the default preset.
2023-10-19 13:01:55 -07:00
Nathan Moinvaziri
0d81d2eaae Added ioapi.h shim for backwards compatibility. 2023-10-19 10:04:40 -07:00
Nathan Moinvaziri
aa4f87309d Silence warnings about BSD_SOURCE being deprecated. 2023-10-03 15:41:28 -07:00
Nick Brighten
2bfdd6e6a7 Fixed implicit conversion precision warnings
Implicit conversion loses integer precision: 'unsigned long' to 'int32_t' (aka 'int') in line 124, 145 and 534

Implicit conversion loses integer precision: 'unsigned long' to 'uint32_t' (aka 'unsigned int') in line 599
2023-09-12 12:07:35 -07:00
Leander Schulten
7cb316f28b Fix pkgconfig file for private dependencies 2023-09-12 12:05:12 -07:00
Mike Kasick
21606891ab Support compression levels >= 10 and use zstd's internal default level.
zstd supports regular compression levels 1 through 22.  The special
level 0 indicates to use zstd's internal default (currently level 3).
2023-09-12 12:03:29 -07:00
Nathan Moinvaziri
680d6f1dcf Version 4.0.1. 4.0.1 2023-08-04 11:23:54 -07:00
pmq
23945b8f43 Add sanitizers from zlib-ng
Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
2023-07-31 10:02:18 -07:00
pmqs
693edec9fa Fix for Names truncated at 256 bytes #690
Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
2023-07-31 10:01:33 -07:00
Nathan Moinvaziri
706737f980 Change CMake to use CheckCSourceCompiles for compatibility. #720 2023-07-31 10:01:03 -07:00
pmqs
2823bcc193 Fix memory leak in mz_zip_writer_copy_from_reader #717 2023-07-31 10:01:03 -07:00
Peter Harris
9453d4ffcf Fix zstd compression level 2023-07-08 13:30:42 -07:00
Sam James
d14fb2f294 CMake: fix SONAME for MZ_COMPAT
zlib's minizip has SONAME 1. MZ_COMPAT intends to provide ABI and API compatibility,
so its SONAME should match.

The layout with this is:
```
libminizip.so -> libminizip.so.1
libminizip.so.1 -> libminizip.so.4.0.0
libminizip.so.4.0.0
```

Signed-off-by: Sam James <sam@gentoo.org>
2023-06-27 14:19:03 -07:00
Brad Smith
57be074f6f CMake: Fix build with OpenBSD #711
Setting _POSIX_C_SOURCE on OpenBSD breaks the build. _BSD_SOURCE needs
to be set at the same time to enable some functions.

In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5:
In file included from /usr/local/include/gtest/gtest.h:55:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'?
    int __res = vasprintf(__s, __format, __va);
                ^
/usr/include/c++/v1/cstdio:124:9: note: 'vsprintf' declared here
using ::vsprintf _LIBCPP_USING_IF_EXISTS;
        ^
In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5:
In file included from /usr/local/include/gtest/gtest.h:55:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:27: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'char **'
    int __res = vasprintf(__s, __format, __va);
                          ^~~
/usr/include/stdio.h:269:21: note: passing argument to parameter here
int      vsprintf(char *, const char *, __va_list);
                        ^
2 errors generated.
2023-06-11 09:47:50 -07:00
Richard Huveneers
b4affb4f9d Only return MZ_MEM_ERROR if no other error code was returned before. 2023-06-11 09:47:29 -07:00