105 Commits

Author SHA1 Message Date
Nathan Moinvaziri
2c51fa719e Clang-format style changes. 2024-11-01 16:37:57 -07: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
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
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
Nathan Moinvaziri
217adc9363 Remove first param from create functions.
Better handle low memory situations.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
5dd5fe0906 Add missing string.h include for strdup. 2023-03-31 18:21:47 -07:00
Nathan Moinvaziri
c9fc27ccee Use calloc instead of malloc + memset and use strdup where possible. 2023-02-24 14:35:31 -08:00
Nathan Moinvaziri
261041dabc Remove useless MZ_CUSTOM_ALLOC and MZ_CUSTOM_FREE.
It would have required an include to make it useful.
2023-02-24 14:23:04 -08:00
Nathan Moinvaziri
f07faecdde Remove all comparisons to NULL. 2023-02-19 16:04:13 -08:00
Nathan Moinvaziri
03e4d2213d Remove copyright years. 2023-02-16 13:14:21 -08:00
Nathan Moinvaziri
848c3e3503 Removed empty lines. 2022-11-29 17:19:49 -08:00
Peter Harris
27f2ff225f Fix buffer overrun in mz_dir_make
If a path of length 0x10001 is passed into this function, the value of
len after truncating to int16_t will be greater than 0, so the function
will proceed to allocate a 2 byte buffer and copy 65538 bytes into it.

Avoid issues with truncation by keeping len in size_t.
2022-02-17 08:50:35 -08:00
Peter Harris
76de77b2e2 Fix buffer overrun in mz_path_combine
The path may be overrun by two bytes. One because mz_path_append_slash
may append to path without updating path_len, and another one because
strncat always appends a NUL byte after writing N bytes.

Rescan the path length and subtract one from the strncat length parameter
to make sure we stay within max_path.
2022-02-16 10:40:17 -08:00
Nathan Moinvaziri
db95894646 Updated name of project to minizip-ng. 2021-01-23 16:19:05 -08:00
Nathan Moinvaziri
70811ac6f5 Remove version number from headers. 2020-06-19 21:21:12 -07:00
Nathan Moinvaziri
ea9d986394 Remove extra unnecessary check for null-terminator. 2020-06-14 22:00:02 -07:00
Nathan Moinvaziri
dc6962b5fa Use same brace style as zlib. 2020-06-14 22:00:02 -07:00
Nathan Moinvaziri
2aa369c468 Version 2.9.3. 2020-05-21 07:31:09 -07:00
Nathan Moinvaziri
b39f7a0e89 Version 2.9.2. 2020-02-12 08:38:09 -08:00
Nathan Moinvaziri
370ab036f3 Version 2.9.1. 2019-11-15 13:24:17 -08:00
Nathan Moinvaziri
d82ea2c654 Added more test cases for path resolving.
Fixed branching in resolve function.
2019-11-03 16:44:58 -08:00
Nathan Moinvaziri
e22948c731 Fixed path not resolving properly when previous output buffer contains certain characters. #433 2019-10-29 16:46:55 -07:00
Nathan Moinvaziri
8d6875d9c2 Fixed path not resolving properly when it begins with ..\ more than once. #433 2019-10-23 22:21:21 -07:00
Nathan Moinvaziri
10ac291d91 Version 2.9.0. 2019-09-18 16:55:43 -07:00
Nathan Moinvaziri
32fd805440 Version 2.8.9. 2019-07-04 10:32:02 -07:00
Nathan Moinvaziri
fbfd4e82f7 Version 2.8.8. 2019-05-22 17:50:39 -07:00
Nathan Moinvaziri
64c4c7f868 Version 2.8.7. 2019-05-09 18:46:18 -07:00
Nathan Moinvaziri
7d94b1ffa1 Fixed symbolic link issues on win32. Ensure that reading a symbolic link dir on windows produces linkname with slash at the end for recreation. 2019-05-08 23:41:47 -07:00
Nathan Moinvaziri
3a941ef473 Return forward slashed path from mz_os_read_symlink on windows. 2019-05-08 19:24:09 -07:00
Nathan Moinvaziri
a5a1d5d272 Store symbolic links in UNIX1 extra field instead of file attributes.
Correct reading of UNIX1 extra field timestamps.
Added option to store links to minizip cmd.
2019-05-05 20:13:58 -07:00
Nathan Moinvaziri
36f61523a3 Remove multiple slashes if they occur on the end of a path. 2019-05-05 08:19:14 -07:00
Nathan Moinvaziri
3249eac087 Added support for symbolic links. ZipArchive/ZipArchive#424. 2019-05-02 21:07:39 -07:00
Nathan Moinvaziri
3c438164bd Added gzip example app. 2019-04-28 09:23:56 -07:00
Nathan Moinvaziri
4fe0687243 Version 2.8.6. 2019-04-08 13:26:32 -07:00
Nathan Moinvaziri
488f20ff1b Version 2.8.5. 2019-03-17 09:38:10 -07:00
Nathan Moinvaziri
9805ab4117 Version 2.8.4. 2019-02-14 17:16:01 -08:00
Nathan Moinvaziri
2e2f995eda Version 2.8.3. 2019-01-26 16:49:48 -08:00
Nathan Moinvaziri
2ca7f3950c Version 2.8.2. 2019-01-08 16:07:10 -08:00
Nathan Moinvaziri
b150432588 Fixed filename not being removed from path in certain instances. 2019-01-07 13:09:16 -08:00
Nathan Moinvaziri
1ff40343b5 Version 2.8.1. 2018-12-01 09:59:19 -08:00
Nathan Moinvaziri
5cb88b8f09 Version 2.8.0. 2018-11-24 17:59:11 -08:00
Nathan Moinvaziri
b16ab566ef Change comments to C89 style.
Added _POSIX_C_SOURCE definition for necessary version of POSIX.
2018-11-20 16:56:21 -08:00
Nathan Moinvaziri
1ee609b759 Make inttypes.h optional. #345 2018-11-19 21:34:35 -08:00
Nathan Moinvaziri
c1e07aaeb0 Fixed missing time include. 2018-11-19 20:38:20 -08:00
Nathan Moinvaziri
b2b082c67d Version 2.7.5. 2018-11-13 15:22:15 -08:00
Nathan Moinvaziri
c47090678d Version 2.7.4. 2018-11-06 21:12:16 -08:00
Nathan Moinvaziri
826113fd6c Version 2.7.3. 2018-11-04 12:52:58 -08:00
Nathan Moinvaziri
1b87a5a358 Removed old crc32 streams. 2018-11-03 19:47:20 -07:00
Nathan Moinvaziri
e63d231fa5 Moved crc hashing and pbkdf2 to crypt.
Provide backup crc32 function if zlib or lzma not used.
Fixed check for no signing in minizip.
2018-11-03 19:45:41 -07:00
Nathan Moinvaziri
888e8a7324 Version 2.7.2. 2018-11-02 17:47:53 -07:00