Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 9 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ keywords = ["rust", "mobile", "android", "ios", "slint"]
categories = ["command-line-utilities", "development-tools::build-utils", "gui"]

[workspace.dependencies]
base64 = "0.22.1"
base64 = "0.23.1"
camino = { version = "1.1.10", features = ["serde1"] }
cap-std = "4.0.2"
clap = { version = "4.5.40", features = ["derive", "env", "wrap_help"] }
Expand Down Expand Up @@ -55,7 +55,7 @@ thiserror = "2.0.12"
toml = "1.1.4"
url = { version = "2.5.4", features = ["serde"] }
unicode-normalization = "0.1.25"
ureq = { version = "=3.3.0", default-features = false, features = ["rustls"] }
ureq = { version = "=3.4.0", default-features = false, features = ["rustls"] }
uuid = { version = "1.17.0", features = ["serde", "v4"] }
windows-sys = { version = "0.61.2", features = [
"Wdk_Storage_FileSystem",
Expand All @@ -70,7 +70,7 @@ windows-sys = { version = "0.61.2", features = [
"Win32_System_SystemServices",
"Win32_System_Threading",
] }
zip = { version = "6.0.0", default-features = false, features = ["deflate-flate2-zlib-rs"] }
zip = { version = "8.6.0", default-features = false, features = ["deflate-flate2-zlib-rs"] }

[workspace.lints.rust]
unsafe_code = "deny"
Expand Down
28 changes: 2 additions & 26 deletions LICENSES/cargo-dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "1.0.2"
},
{
"checksum": "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1",
"license": "MIT OR Apache-2.0",
"name": "arbitrary",
"repository": "https://github.com/rust-fuzz/arbitrary/",
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "1.4.2"
},
{
"checksum": "2aa3a22042e45de04255c7bf3626e239f450200fd0493c1e382263544b20aea6",
"license": "MIT OR Apache-2.0",
Expand Down Expand Up @@ -512,14 +504,6 @@
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "0.5.8"
},
{
"checksum": "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a",
"license": "MIT OR Apache-2.0",
"name": "derive_arbitrary",
"repository": "https://github.com/rust-fuzz/arbitrary",
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "1.4.2"
},
{
"checksum": "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8",
"license": "MIT",
Expand Down Expand Up @@ -2129,12 +2113,12 @@
"version": "0.9.0"
},
{
"checksum": "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0",
"checksum": "972d7902c8735f2695410b8aed7df6ed12a47394aa1c8d7af49f0497b731a94d",
"license": "MIT OR Apache-2.0",
"name": "ureq",
"repository": "https://github.com/algesten/ureq",
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "3.3.0"
"version": "3.4.0"
},
{
"checksum": "da5f78b09e6941e1a0f2e30e695e4b120377b54d5e0aec11b594bb57b3971613",
Expand Down Expand Up @@ -2608,14 +2592,6 @@
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "0.11.3"
},
{
"checksum": "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b",
"license": "MIT",
"name": "zip",
"repository": "https://github.com/zip-rs/zip2.git",
"source": "registry+https://github.com/rust-lang/crates.io-index",
"version": "6.0.0"
},
{
"checksum": "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b",
"license": "MIT",
Expand Down
12 changes: 8 additions & 4 deletions crates/rustferry-github/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,14 +939,16 @@ fn scan_archive(
if !header_starts.insert(entry.header_start()) {
return Err(GithubArtifactError::LinkedOrSpecialEntry);
}
let data_end = entry
let data_start = entry
.data_start()
.ok_or(GithubArtifactError::InvalidArchive)?;
let data_end = data_start
.checked_add(entry.compressed_size())
.ok_or(GithubArtifactError::InvalidArchive)?;
if data_end > archive_size {
return Err(GithubArtifactError::InvalidArchive);
}
compressed_ranges.push((entry.data_start(), data_end));
compressed_ranges.push((data_start, data_end));
expanded_size = expanded_size
.checked_add(entry.size())
.ok_or(GithubArtifactError::ExpandedArchiveTooLarge)?;
Expand Down Expand Up @@ -1784,14 +1786,16 @@ fn inspect_signed_tree_zip(
if !header_starts.insert(entry.header_start()) {
return Err(GithubArtifactError::InvalidProductArchive(artifact));
}
let data_end = entry
let data_start = entry
.data_start()
.ok_or(GithubArtifactError::InvalidProductArchive(artifact))?;
let data_end = data_start
.checked_add(entry.compressed_size())
.ok_or(GithubArtifactError::InvalidProductArchive(artifact))?;
if data_end > archive_size {
return Err(GithubArtifactError::InvalidProductArchive(artifact));
}
compressed_ranges.push((entry.data_start(), data_end));
compressed_ranges.push((data_start, data_end));
if let (Some(wrapper_root), Some(wrapper_prefix)) =
(wrapper_root, wrapper_prefix.as_deref())
{
Expand Down
10 changes: 5 additions & 5 deletions crates/rustferry-github/src/artifact_offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,19 +603,19 @@ fn scan_zip(
}
register_zip_path(&portable_name, entry.is_dir(), &mut files, &mut directories)?;
validate_zip_metadata(&entry)?;
if entry.header_start() >= entry.data_start() || entry.data_start() > archive_size {
let data_start = entry.data_start().ok_or(OfflineArtifactError::InvalidZip)?;
if entry.header_start() >= data_start || data_start > archive_size {
return Err(OfflineArtifactError::InvalidZip);
}
let end = entry
.data_start()
let end = data_start
.checked_add(entry.compressed_size())
.ok_or(OfflineArtifactError::InvalidZip)?;
if end > archive_size {
return Err(OfflineArtifactError::InvalidZip);
}
ranges.push((entry.header_start(), entry.data_start()));
ranges.push((entry.header_start(), data_start));
if entry.compressed_size() != 0 {
ranges.push((entry.data_start(), end));
ranges.push((data_start, end));
}
expanded_size = expanded_size
.checked_add(entry.size())
Expand Down
6 changes: 4 additions & 2 deletions crates/rustferry-github/src/artifact_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -779,14 +779,16 @@ fn scan_unsigned_envelope(
if !header_starts.insert(entry.header_start()) {
return Err(GithubArtifactStoreError::InvalidUnsignedEnvelope);
}
let data_end = entry
let data_start = entry
.data_start()
.ok_or(GithubArtifactStoreError::InvalidUnsignedEnvelope)?;
let data_end = data_start
.checked_add(entry.compressed_size())
.ok_or(GithubArtifactStoreError::InvalidUnsignedEnvelope)?;
if data_end > archive_size {
return Err(GithubArtifactStoreError::InvalidUnsignedEnvelope);
}
compressed_ranges.push((entry.data_start(), data_end));
compressed_ranges.push((data_start, data_end));
expanded_size = expanded_size
.checked_add(entry.size())
.ok_or(GithubArtifactStoreError::InvalidUnsignedEnvelope)?;
Expand Down