Commit graph

397 commits

Author SHA1 Message Date
Chris Hennick
3ecd65176c
refactor: Eliminate some magic numbers and unnecessary path prefixes (#225)
* refactor: eliminate a magic number for CDE block size

* refactor: Minor refactors

* refactor: Can use cde_start_pos to locate ZIP64 end locator

* chore: Fix import that can no longer be feature-gated

* chore: Fix import that can no longer be feature-gated
2024-07-28 01:43:44 +00:00
Chris Hennick
a60bd79826
Merge pull request #210 from a1phyr/multiple_refactors
Multiple refactors
2024-07-20 01:29:39 +00:00
Chris Hennick
7471cf526f
refactor: change invalid_state() return type to io::Result<T>
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
2024-07-19 13:32:23 -07:00
Chris Hennick
c14986806a Fix divergence from origin/master 2024-07-18 21:02:19 +00:00
Chris Hennick
81b5fb6088 Update fuzz_write corpus to use only smaller entries 2024-07-18 21:02:16 +00:00
Chris Hennick
6106a2bf0b
Merge pull request #201 from nichmor/fix/soft-links-should-remain-the-same
fix: soft links should remain the same
2024-07-18 17:26:17 +00:00
Chris Hennick
6b797b1ba9
Merge pull request #64 from zip-rs/oldpr368
feat: Added function to get if a file is encrypted or not
2024-07-17 17:25:50 +00:00
Chris Hennick
5632e7f25a
Merge pull request #69 from zip-rs/oldpr369
feat: Add by_name_seek() for Stored zips
2024-07-17 17:25:19 +00:00
Chris Hennick
b8c145717b
Merge pull request #212 from a1phyr/improve_unsafe_code
refactor: Improve `FixedSizeBlock`
2024-07-17 17:24:58 +00:00
Benoît du Garreau
e9b13121cc Make make_crypto_reader take ZipFileData directly 2024-07-16 10:54:52 +02:00
Benoît du Garreau
deb71baf9b Remove crypto_reader field from ZipFile 2024-07-16 10:54:51 +02:00
Benoît du Garreau
b01d5c9b1f Split reader and decompressor 2024-07-16 10:47:11 +02:00
Chris Hennick
bde1bb9ef1
Merge branch 'master' into fix/soft-links-should-remain-the-same 2024-07-15 09:01:34 -07:00
Benoît du Garreau
7a8048b159 Improve FixedSizeBlock
- Remove allocations
- Make unsafe code easier to check
- Prevent potential `repr(Rust)` fields reordering
2024-07-12 11:11:17 +02:00
Benoît du Garreau
83b1273fab Improve several Read methods on ZipFile 2024-07-11 14:31:31 +02:00
nichmor
a3232a2119
Merge branch 'master' into fix/soft-links-should-remain-the-same 2024-07-08 17:15:38 +03:00
Chris Hennick
57f01ba946
chore: Fix build errors 2024-07-06 14:26:37 -07:00
Chris Hennick
8635b16316
Merge branch 'master' into oldpr368 2024-07-06 12:38:27 -07:00
Chris Hennick
1d551ff23c
Merge branch 'master' into oldpr369
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
2024-07-06 12:19:59 -07:00
nichmor
955ea393ee fix: read entire target and dont transform symlink to absoulte 2024-06-26 16:24:04 +03:00
Chris Hennick
0807029a63
Merge branch 'master' into xz 2024-06-22 16:58:54 -07:00
Chris Hennick
b051ca3d47
chore: Fix a bug introduced by c934c824 2024-06-22 16:57:49 -07:00
Chris Hennick
5b749c4ed9
Merge branch 'master' into xz 2024-06-21 23:15:47 -07:00
Chris Hennick
fcc4fa93e3
style: Fix a Clippy warning re unnecessary into_iter() 2024-06-21 23:15:23 -07:00
Chris Hennick
c0ede17cd0
Merge branch 'master' into xz 2024-06-21 20:29:30 -07:00
Chris Hennick
e20fd7959a
style: cargo fmt --all 2024-06-21 20:28:43 -07:00
Chris Hennick
9a2391358c
Merge branch 'master' into xz 2024-06-21 20:26:07 -07:00
Chris Hennick
c934c82405
fix: Some archives with over u16::MAX files were handled incorrectly or slowly (#189) 2024-06-21 20:22:15 -07:00
LoveSy
421e1dd8fb
feat: support XZ decompression 2024-06-22 11:12:53 +08:00
Chris Hennick
26e6462a8d
style: cargo fmt --all 2024-06-21 10:34:03 -07:00
Chris Hennick
27c7fa4cd4
chore: Fix a failing unit test 2024-06-20 13:40:12 -07:00
Chris Hennick
f1b617d112
fix: Check number of files when deciding whether a CDE is the real one 2024-06-20 04:45:43 -07:00
Chris Hennick
78a38e977a
fix: Could still select a fake CDE over a real one in some cases 2024-06-18 22:33:24 -07:00
Chris Hennick
a895aa57b1
style: cargo fmt --all 2024-06-18 20:11:56 -07:00
Chris Hennick
d309f07010
chore: Fix build errors on older Rust versions 2024-06-18 20:09:50 -07:00
Chris Hennick
9bf914d7d4
fix: May have to consider multiple CDEs before filtering for validity 2024-06-18 19:58:16 -07:00
Chris Hennick
45472486f1
style: Fix a Clippy warning 2024-06-18 12:41:16 -07:00
Chris Hennick
19118f45f3
chore: Fix build 2024-06-18 10:41:35 -07:00
Chris Hennick
cb2d7abde7
fix: We now keep searching for a real CDE header after read an invalid one from the file comment 2024-06-18 10:31:25 -07:00
Chris Hennick
9568e713bd
style: cargo fmt --all 2024-06-17 18:54:06 -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
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
fdb79845be
perf: Only build one IndexMap after choosing among the possible valid headers 2024-06-14 15:03:56 -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
ede85c0f9e
test: Fix bug: wrong field was being used for CRC32 2024-06-14 10:01:50 -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