Files
craft-libs/crates/jxl/Cargo.toml
T
Diego Chagas f57bbca24f jxl: bound brob metadata boxes before jxl-oxide inflates them (#2134)
jxl-oxide decompresses brob (Brotli Exif/XMP) boxes into a buffer its AllocTracker
does not count, so a 54-byte box expanded to 64 MiB of XMP and a larger one can ask for
gigabytes before any pixel limit applies. decode now inflates every brob box under one
8 MiB budget per file, rewrites it as the plain box it wraps and drops boxes past the
budget, nested or broken ones. Files without a brob box are not copied.
2026-11-18 15:25:26 -05:00

29 lines
809 B
TOML

[package]
name = "craft-jxl"
description = "JPEG XL image decoding and encoding with bounded input and allocation tracking."
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
[lints]
workspace = true
[features]
default = ["decode", "encode"]
decode = ["dep:jxl-oxide", "dep:brotli-decompressor"]
encode = ["dep:jixel"]
[dependencies]
jxl-oxide = { workspace = true, optional = true }
# Bounds the Brotli-compressed metadata boxes before jxl-oxide inflates them (see brob.rs).
brotli-decompressor = { version = "5", optional = true }
thiserror = { workspace = true }
[dev-dependencies]
craft-cms = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
jixel = { workspace = true, optional = true }