Commit graph

2135 commits

Author SHA1 Message Date
Chris Hennick
2a035f5201
fix: Overflow panic when central directory extra data is too large 2024-06-14 17:42:06 -07:00
Chris Hennick
5ae025e2cb
style: cargo fmt --all 2024-06-14 17:16:03 -07:00
Chris Hennick
1b7c09e558
test(fuzz): Fix a build error 2024-06-14 17:14:42 -07:00
Chris Hennick
052f3a133e
fix: ZIP64 header was being written twice when copying a file 2024-06-14 17:09:36 -07:00
Chris Hennick
a770913f7b
fix: ZIP64 header was being written to central header twice 2024-06-14 16:38:11 -07:00
Chris Hennick
40093e9955
fix: Start position was incorrect when file had no extra data 2024-06-14 15:50:54 -07:00
Chris Hennick
af7b27a21d
perf: Speed up CRC when encrypting small files 2024-06-14 15:47:41 -07:00
Chris Hennick
185b1a1fd1
perf: Limit the number of extra fields 2024-06-14 15:32:52 -07:00
Chris Hennick
9d9c1ce1f1
perf: Refactor extra-data validation 2024-06-14 15:26:27 -07:00
Chris Hennick
2eee2798a5
perf: Store extra data in plain vectors until after validation 2024-06-14 15:22:54 -07:00
Chris Hennick
fdb79845be
perf: Only build one IndexMap after choosing among the possible valid headers 2024-06-14 15:03:56 -07:00
Chris Hennick
5cfa0677ff
chore: Fix a build error 2024-06-14 14:42:20 -07:00
Chris Hennick
20d55432dc
perf: Simplify validation of empty extra-data fields 2024-06-14 14:39:34 -07:00
Chris Hennick
2006da5ab8
perf: Validate automatic extra-data fields only once, even if several are present 2024-06-14 14:26:06 -07:00
Chris Hennick
7afe34b521
perf: Remove redundant validate_extra_data() call 2024-06-14 14:19:22 -07:00
Chris Hennick
c218405bdd
fix: Allow all reserved headers we can create 2024-06-14 14:06:17 -07:00
Chris Hennick
1e4dcc9928
test: Fix a bug in test_invalid_extra_data when building without Zopfli 2024-06-14 13:51:27 -07:00
Chris Hennick
63cfa7d319
test: Fix the invalid-extra-data test and add a new one 2024-06-14 13:31:52 -07:00
Chris Hennick
c4bd7a61a5
test: Fix a bug involving ZIP64 field parsing 2024-06-14 13:25:49 -07:00
Chris Hennick
499bd65f71
test: Fix bugs involving AES encryption 2024-06-14 11:45:37 -07:00
Chris Hennick
c0fd504771
test: Fix bug: need a new invalid ID 2024-06-14 10:22:57 -07:00
Chris Hennick
d698b4d333
test: Fix bug: some reserved header IDs can now be used 2024-06-14 10:19:48 -07:00
Chris Hennick
ede85c0f9e
test: Fix bug: wrong field was being used for CRC32 2024-06-14 10:01:50 -07:00
Chris Hennick
d91e9ff436
test: Fix failing test: kind tag was being read twice 2024-06-14 09:41:48 -07:00
Chris Hennick
b635a7d7e3
style: Fix more Clippy warnings 2024-06-14 00:21:52 -07:00
Chris Hennick
94df73ea04
chore: Fix boxed_local warning (can borrow instead) 2024-06-14 00:17:21 -07:00
Chris Hennick
cbb180a316
docs: Refine a comment 2024-06-14 00:04:44 -07:00
Chris Hennick
30bbd0f7c8
test: Suppress needless_update for unit tests 2024-06-14 00:03:37 -07:00
Chris Hennick
e555f8c770
test: Fix a bug 2024-06-14 00:00:37 -07:00
Chris Hennick
348611f62b
test: Fix a bug 2024-06-13 23:54:01 -07:00
Chris Hennick
ce323636de
test: Fix a build error with --no-default-features 2024-06-13 23:48:23 -07:00
Chris Hennick
16f619d9f2
chore: Partial debug 2024-06-13 23:44:37 -07:00
Chris Hennick
6b93d358d5
chore: Fix more errors when parsing multiple extra fields 2024-06-13 23:11:32 -07:00
Chris Hennick
290fd97013
chore: Fix an error when decoding AES header 2024-06-13 23:01:46 -07:00
Chris Hennick
32f946e788
chore: Fix an error caused by not allowing 0xa11e field 2024-06-13 22:59:02 -07:00
Chris Hennick
60f7c637e6
test: Fix more build errors in no-default-features build 2024-06-13 22:46:05 -07:00
Chris Hennick
0ad79e9ab3
test: Fix a build error when unreserved was disabled 2024-06-13 22:43:48 -07:00
Chris Hennick
9e12b6db0c
chore: Bug fix: crypto_header was being counted toward extra_data_end 2024-06-13 22:41:47 -07:00
Chris Hennick
7f641d23a3
chore: Bug fix: revert a change where crypto_header was incorrectly treated as an extra field 2024-06-13 22:29:22 -07:00
Chris Hennick
bf3e7510a6
chore: Fix a bug where a modulo of 0 was used 2024-06-13 22:22:56 -07:00
Chris Hennick
3436a569ab
style: cargo fmt --all 2024-06-13 22:20:58 -07:00
Chris Hennick
aa896ce992
chore: Fix a bug when ZipCrypto, alignment *and* a custom header are used 2024-06-13 22:19:18 -07:00
Chris Hennick
7b2e31ca7f
chore: Fix a bug when both ZipCrypto and alignment are used 2024-06-13 21:43:21 -07:00
Chris Hennick
0d9fd0da0b
chore: Fix another bug: header_end vs extra_data_end 2024-06-13 21:39:09 -07:00
Chris Hennick
0f0ef1dd96
chore: Fix use of a stale value in a debug_assert_eq! 2024-06-13 21:35:55 -07:00
Chris Hennick
40d2da84f7
test: Fix a type mismatch in implementation of Arbitrary 2024-06-13 21:32:43 -07:00
Chris Hennick
19e5af8406
fix: Fix a bug where alignment padding interacts with other extra-data fields 2024-06-13 21:29:17 -07:00
Chris Hennick
88b4ae30b4
fix: Fix bugs involving alignment padding and Unicode extra fields 2024-06-13 20:52:45 -07:00
Chris Hennick
1e118199f7
fix: Incorrect header when adding AES-encrypted files 2024-06-13 19:24:54 -07:00
Chris Hennick
0bd2fe11d7
fix: Parse the extra field and reject it if invalid 2024-06-13 17:48:54 -07:00