Commit graph

2161 commits

Author SHA1 Message Date
Chris Hennick
db4a967eba
style: Fix a Clippy warning 2024-06-17 18:21:47 -07:00
Chris Hennick
24fc14701b
style: Suppress Clippy warnings for octal-looking escapes 2024-06-17 18:18:57 -07:00
Chris Hennick
4065f0501f
fix: Always search for data start when opening an archive for append, and reject the header if data appears to start after central directory 2024-06-17 17:44:34 -07:00
Chris Hennick
6f120223b2
fix: deep_copy_file no longer allows overwriting an existing file, to match the behavior of shallow_copy_file 2024-06-17 15:17:03 -07:00
Chris Hennick
8d78fd98f5
fix: File start position was wrong when extra data was present 2024-06-17 15:15:15 -07:00
Chris Hennick
fec15c0680
style: cargo fmt --all 2024-06-17 12:09:35 -07:00
Chris Hennick
19cf889b3b
style: Fix a Clippy warning 2024-06-17 12:08:55 -07:00
Chris Hennick
64b5debc16
chore: Fix another fuzz failure 2024-06-17 12:06:37 -07:00
Chris Hennick
16aa9bcddf
test: fix a failing unit test 2024-06-15 15:33:52 -07:00
Chris Hennick
58b982c99e
style: Fix a Clippy warning 2024-06-15 15:18:52 -07:00
Chris Hennick
5b285d7cbf
test: Fix some tests that were failing when Zopfli wasn't enabled 2024-06-15 15:15:02 -07:00
Chris Hennick
e6661bcd98 Update fuzz_write corpus using multiple from-scratch restarts 2024-06-15 17:44:32 +00:00
Chris Hennick
67b9d2a91a test(fuzz): Make build-fuzz-corpus-multiple-restarts fail fast 2024-06-15 02:04:43 +00:00
Chris Hennick
e5930f5d53 Partial corpus update 2024-06-15 02:04:43 +00:00
Chris Hennick
7f1752ccbb Partial corpus update 2024-06-15 02:04:43 +00:00
Chris Hennick
4dcad53f63 Partial update of fuzz_write corpus 2024-06-15 02:04:43 +00:00
Chris Hennick
b8ed84e874 Partial corpus update 2024-06-15 02:04:43 +00:00
Chris Hennick
aed6d5091a Partial fuzz_write corpus update 2024-06-15 02:04:43 +00:00
Chris Hennick
f4748beff6 Bug fix for new script 2024-06-15 02:04:43 +00:00
Chris Hennick
5423e4ad26 Partial corpus update 2024-06-15 02:04:43 +00:00
Chris Hennick
825ea4336b New corpus-building script with multiple restarts 2024-06-15 02:04:43 +00:00
Chris Hennick
4fd5cb7ea5 Final corpus updates 2024-06-15 02:04:43 +00:00
Chris Hennick
c7116f54d6
chore: Switch to ok_or_abort_file, and inline when that fails borrow checker 2024-06-14 19:03:31 -07:00
Chris Hennick
e3ccaf6e00
chore: Switch to ok_or_abort_file, and inline when that fails borrow checker 2024-06-14 19:01:16 -07:00
Chris Hennick
405d923d9d
refactor: Use new do_or_abort_file method 2024-06-14 18:16:06 -07:00
Chris Hennick
e23f676c40
fix: Abort file if central extra data is too large 2024-06-14 18:01:42 -07:00
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