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
2 changes: 1 addition & 1 deletion .github/workflows/crates-package-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Full commit SHA on main used for this release
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crates-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Copy the full source SHA from the successful Crates Package Preflight summary
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kotlin-android-package-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Full commit SHA on main used for this release
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kotlin-android-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Copy the full source SHA from the successful Kotlin Android Package Preflight summary
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-package-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Full commit SHA on main used for this release
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Copy the full source SHA from the successful npm Package Preflight summary
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swift-package-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Full commit SHA on main used for this release
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swift-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: Release version without leading v
required: true
type: string
default: 0.4.4
default: 0.4.5
source_sha:
description: Copy the full source SHA from the successful Swift Package Preflight summary
required: true
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## 0.4.4 (unreleased)
## 0.4.5 (unreleased)

- Allow explicit general-CBOR input, output, and aggregate byte-string budgets
up to 2 MiB. Defaults remain 1 MiB; other resource limits are unchanged.
- Apply the selected input budget to received fragments in both encoding adapters.

## 0.4.4

- Require Rust 1.100 and ReallyMe Buffa 0.1.3.
- Bound memory use when decoding nested or repeated DER SET OF values.
Expand Down
28 changes: 14 additions & 14 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 Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// SwiftPM and Xcode only read `Package.swift` at the repository root when a
// package is consumed by URL, e.g.
//
// .package(url: "https://github.com/reallyme/codec", from: "0.4.4")
// .package(url: "https://github.com/reallyme/codec", from: "0.4.5")
// .product(name: "ReallyMeCodec", package: "codec")
//
// The Swift sources live under `packages/swift/` to keep symmetry with the
Expand All @@ -22,9 +22,9 @@ let ffiArtifactChecksumPlaceholder =
"0000000000000000000000000000000000000000000000000000000000000000"
// Keep the binary dependency disabled until preflight binds the matching archive.
let ffiArtifactChecksum = "0000000000000000000000000000000000000000000000000000000000000000"
let ffiArtifactVersion = "0.4.4"
let ffiArtifactVersion = "0.4.5"
let ffiArtifactLocalPathOverride = ""
let packageVersion = "0.4.4"
let packageVersion = "0.4.5"
let hasReleasedFfiArtifact =
ffiArtifactChecksum != ffiArtifactChecksumPlaceholder && ffiArtifactVersion == packageVersion
let useRuntimeFfiProvider =
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ strict DER reader or the borrowed `tlv` framing surface separately and select
only the families they use:

```toml
reallyme-codec = { version = "0.4.4", default-features = false, features = [
reallyme-codec = { version = "0.4.5", default-features = false, features = [
"base64url",
"multikey",
] }
Expand All @@ -117,7 +117,7 @@ Swift 6.3 or newer is required.
```swift
.package(
url: "https://github.com/reallyme/codec",
from: "0.4.4"
from: "0.4.5"
)
```

Expand All @@ -129,15 +129,15 @@ Swift 6.3 or newer is required.

```kotlin
dependencies {
implementation("me.really:codec:0.4.4")
implementation("me.really:codec:0.4.5")
}
```

### Android

```kotlin
dependencies {
implementation("me.really:codec-android:0.4.4")
implementation("me.really:codec-android:0.4.5")
}
```

Expand All @@ -161,7 +161,7 @@ compatible fixes increment the patch version, such as `0.4.0` to `0.4.1`.

For Rust consumers, pin to the minor line you have reviewed, for example
`reallyme-codec = "0.4"`. A full version written by `cargo add`, such as
`reallyme-codec = "0.4.4"`, uses Cargo caret semantics and remains on the same
`reallyme-codec = "0.4.5"`, uses Cargo caret semantics and remains on the same
`0.4.x` compatibility line. For npm, Maven, SwiftPM, and release artifacts used
in production, prefer exact versions or locked dependency files so every
language lane runs the same reviewed codec release.
Expand Down
6 changes: 3 additions & 3 deletions crates/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "reallyme-codec-adapter"
version = "0.4.4"
version = "0.4.5"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand All @@ -13,10 +13,10 @@ publish.workspace = true
description = "Internal scalar policy for ReallyMe codec boundaries."

[dependencies]
codec-runtime = { package = "reallyme-codec", version = "=0.4.4", path = "../codec", default-features = false, features = ["operation-contract"] }
codec-runtime = { package = "reallyme-codec", version = "=0.4.5", path = "../codec", default-features = false, features = ["operation-contract"] }

[dev-dependencies]
codec-multibase = { package = "reallyme-codec-multibase", version = "=0.4.4", path = "../multibase" }
codec-multibase = { package = "reallyme-codec-multibase", version = "=0.4.5", path = "../multibase" }

[lints]
workspace = true
4 changes: 2 additions & 2 deletions crates/base64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "reallyme-codec-base64"
version = "0.4.4"
version = "0.4.5"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand All @@ -17,7 +17,7 @@ include = ["/src/**/*.rs", "/tests/**/*.rs", "/Cargo.toml", "/LICENSE", "/NOTICE
name = "codec_base64"

[dependencies]
codec-proto = { package = "reallyme-codec-proto", version = "=0.4.4", path = "../proto", default-features = false, features = ["generated"] }
codec-proto = { package = "reallyme-codec-proto", version = "=0.4.5", path = "../proto", default-features = false, features = ["generated"] }
base64 = { workspace = true }
thiserror = { workspace = true }
zeroize = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/base64url/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "reallyme-codec-base64url"
version = "0.4.4"
version = "0.4.5"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/cbor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "reallyme-codec-cbor"
version = "0.4.4"
version = "0.4.5"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand All @@ -18,7 +18,7 @@ name = "codec_cbor"

[dependencies]
buffa.workspace = true
codec-proto = { package = "reallyme-codec-proto", version = "=0.4.4", path = "../proto", features = ["generated"] }
codec-proto = { package = "reallyme-codec-proto", version = "=0.4.5", path = "../proto", features = ["generated"] }
half = { workspace = true }
cid = { workspace = true }
multihash = { workspace = true }
Expand Down
10 changes: 6 additions & 4 deletions crates/cbor/src/general/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ impl Encoder {
// Account the original structure, not a second semantic tree. Final
// profile validation rejects incompatible widths rather than silently
// rebuilding bytes that may already be authenticated.
if frame.received_bytes().len() > self.budget.limits.input {
return Err(error(ErrorReason::InputLimit));
}
scan(
frame.received_bytes(),
&mut self.budget,
Expand Down Expand Up @@ -217,13 +220,12 @@ impl Encoder {
let value = node.value.as_ref().ok_or(error(ErrorReason::WrongType))?;
self.budget.charge(1)?;
if let Value::ReceivedValue(value) = value {
// Native Received holds a Frame, which proves exact framing and
// the hard input ceiling. Re-establish that proof for wire bytes
// before they can be embedded in a constructed container.
// The caller-selected input budget applies to received fragments
// in both native and generated inputs, independently of output.
if value.value.is_empty() {
return Err(error(ErrorReason::EmptyInput));
}
if value.value.len() > super::limits::MAX_BYTES {
if value.value.len() > self.budget.limits.input {
return Err(error(ErrorReason::InputLimit));
}
let received = scan(
Expand Down
Loading
Loading