Commit Graph

1702 Commits

Author SHA1 Message Date
David Korth
4d76c8b508 mz_os_win32.c: kernel32.dll is always loaded, so use GetModuleHandleW().
The kernel32.dll pathname code had two issues:

1. Using sizeof() for wchar_t[]. sizeof() returns the number of bytes,
   but the wcs*() functions need number of characters, so we end up
   telling wcsncat() that the buffer is twice as big as it actually is.

2. wcsncat()'s size parameter is supposed to be the *remaining* size
   in the buffer, not the total size. wcscat_s() should be used instead,
   since it takes the total size of the buffer.

None of this is actually needed, since kernel32.dll is used by all
Windows programs, so it's always loaded in memory.
2020-02-08 22:13:10 -05:00
Nathan Moinvaziri
082c59a801 Added starting point for documentation. 2020-02-08 09:55:20 -08:00
Nathan Moinvaziri
d49fc77083 Added initial documentation. 2020-02-08 09:23:28 -08:00
Nathan Moinvaziri
53617b364a Always get the size of the current disk which is necessary also for seeking to proper disk when updating the local header values during append operation. 2020-01-04 17:42:51 -08:00
Nathan Moinvaziri
41fcda94f6 Enable data descriptor by default since it doesn't do any seek backs to update the local header.
Fixed seeking to local header when writing split archive. It kept seeking back to disk with the cd instead of the disk with the local header when the disk referenced was the first disk.
2020-01-04 16:55:21 -08:00
Nathan Moinvaziri
a008833eca Fixed bug saving file during erase when data descriptor not being used. 2020-01-04 16:53:10 -08:00
Nathan Moinvaziri
8dae95b53e Don't set output name for cmd targets due to linker issues conflicting with minizip static library with Visual Studio.
Only copy binaries for GH actions release.
2020-01-03 23:06:06 -08:00
Nathan Moinvaziri
6c87ff43fc Allow the ability to disable use of data descriptor. Using data descriptor prevents having to seek backwards or to another disk while writing. However, the local headers aren't updated with the crc or size values. #440 2020-01-03 22:57:15 -08:00
Nathan Moinvaziri
2e5717c80b
Merge pull request #437 from kdev0/dev
Missing mz_strm_os.h in the podspec
2019-12-14 09:42:04 -08:00
Konstantin D
d011482ec7 -updated a search sources rule 2019-12-14 16:14:03 +04:00
Konstantin D
4b35a2777f - added a missing header
- removed nonexistent header
2019-12-09 20:34:55 +04:00
Nathan Moinvaziri
b596ab6b34
Fixed compiler flags when using MSVC-like command line interface. 2019-11-23 21:37:14 -06:00
Nathan Moinvaziri
370ab036f3 Version 2.9.1. 2019-11-15 13:24:17 -08:00
Nathan Moinvaziri
4b5bd87b68 Fixed issues finding data descriptor when previous compressed size is small. #431 2019-11-11 17:04:05 -08:00
Nathan Moinvaziri
d9500db041 Fixed certificate chain not being verified on Windows. 2019-11-11 10:28:07 -08:00
Nathan Moinvaziri
736e165966 Clean up CI since MZ_SIGNING is set to ON by default. 2019-11-10 20:54:27 -08:00
Nathan Moinvaziri
b83550fc01 Merge run tests CI action. 2019-11-10 20:52:09 -08:00
Nathan Moinvaziri
2be4dc08c7 Document MZ_CODE_COVERAGE in readme. 2019-11-10 20:46:24 -08:00
Nathan Moinvaziri
7e42ddda12 Install test certificates. 2019-11-10 20:32:42 -08:00
Nathan Moinvaziri
137b6ebde1 Install test certficate for Ubuntu when using OpenSSL. 2019-11-10 19:45:18 -08:00
Nathan Moinvaziri
39440d01a2 Updated test certificate and signing tests for macOS. 2019-11-10 19:10:57 -08:00
Nathan Moinvaziri
f286b831d0 Overwrite existing central directory if using split disks with append mode. #436 2019-11-10 17:09:48 -08:00
Nathan Moinvaziri
daae8acc64 Fixed unit tests for windows.
Added utf8 test for code coverage.
2019-11-04 11:42:10 -08:00
Nathan Moinvaziri
354903bce8 Added notice about third party licenses. 2019-11-04 08:57:41 -08:00
Nathan Moinvaziri
2dc530f72f Added macro to configure targets. 2019-11-04 08:38:35 -08:00
Nathan Moinvaziri
4d33e1d434 Fixed mem stream required zlib.
Don't produce codecov for release builds.
2019-11-03 22:27:36 -08:00
Nathan Moinvaziri
15507efd00 Don't run certain tests when their code isn't available. 2019-11-03 22:17:24 -08:00
Nathan Moinvaziri
2f4f41b8a6 Reduce output of test cmd app. 2019-11-03 22:06:56 -08:00
Nathan Moinvaziri
5813cf5048 Added feature summary to cmake. 2019-11-03 22:06:27 -08:00
Nathan Moinvaziri
fa995f73bc Don't run signing tests when using BRG. 2019-11-03 21:51:59 -08:00
Nathan Moinvaziri
150cff6b98 Unset MZ_SIGNING when not supported. 2019-11-03 18:24:44 -08:00
Nathan Moinvaziri
3be7dae3c0 Run signing unit tests so long as signing is enabled in cmake. 2019-11-03 18:09:54 -08:00
Nathan Moinvaziri
31afe5e1bd Remove code coverage from release builds. 2019-11-03 18:01:57 -08:00
Nathan Moinvaziri
c4f415aab3 Create test_cmd for code coverage. 2019-11-03 18:01:06 -08:00
Nathan Moinvaziri
f767b8f3ed Fixed link for code coverage. 2019-11-03 17:26:54 -08:00
Nathan Moinvaziri
b1264e4caa Added signing flag to builds. 2019-11-03 17:25:41 -08:00
Nathan Moinvaziri
5d56544c57 Added code coverage badge. 2019-11-03 17:22:31 -08:00
Nathan Moinvaziri
d0d1d68b96 Added support for code coverage. 2019-11-03 17:02:03 -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
106d0ee136 Fixed casting warnings in test code. 2019-10-29 16:36:02 -07:00
Nathan Moinvaziri
e3bd6e8e8b Fixed memory leak during zip entry close. #435 2019-10-24 08:27:46 -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
75741f4b2c
Merge pull request #434 from Coeur/patch-1
Unused variable 'central_header_pos'
2019-10-22 23:03:18 -07:00
Antoine Cœur
296489b206
Unused variable 'central_header_pos' 2019-10-23 13:32:10 +08:00
Nathan Moinvaziri
828823443f Fixed missing variable when FUZZING_ENGINE not found. 2019-10-21 20:28:48 -07:00
Nathan Moinvaziri
57cbcd2fbd Check previous value of err. 2019-10-21 15:37:58 -07:00
Nathan Moinvaziri
545d729594 More robust recovery method, seek to next local header and seek backward for data descriptor. #431 2019-10-21 15:32:18 -07:00
Nathan Moinvaziri
28d87dd8b8 Fixed support for clang without fuzz library.
Fixed fuzzers not building due to missing defines.
Separate stdlib/posix defines from minizip defines.
2019-10-21 07:47:45 -07:00
Nathan Moinvaziri
3d736ceff4 Fixed formatting. 2019-10-19 17:39:02 -07:00