Harden codec and metadata input validation - #3187
Merged
Merged
Conversation
benolimits
pushed a commit
to blaizio/blaizio
that referenced
this pull request
Sep 18, 2026
Updated [AngleSharp](https://github.com/AngleSharp/AngleSharp) from 1.8.1 to 1.8.2. <details> <summary>Release notes</summary> _Sourced from [AngleSharp's releases](https://github.com/AngleSharp/AngleSharp/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/AngleSharp/AngleSharp/commits). </details> Updated [bunit](https://github.com/bUnit-dev/bUnit) from 2.10.3 to 2.11.3. <details> <summary>Release notes</summary> _Sourced from [bunit's releases](https://github.com/bUnit-dev/bUnit/releases)._ ## 2.11.3 ### Fixed - `InvokeOnSpacerBeforeVisible` now uses 4 parameters on .NET 11.0. Reported by [@vnbaaij](https://github.com/vnbaaij) in #1915. Fixed by [@vnbaaij](https://github.com/vnbaaij) in #1919. - A JSInterop timeout elapsing while a result was set could crash the test host with `InvalidOperationException: Nullable object must have a value`. Reported by [@calebcwells](https://github.com/calebcwells) in [#1920](bUnit-dev/bUnit#1920). Fixed by [@linkdotnet](https://github.com/linkdotnet). Commits viewable in [compare view](bUnit-dev/bUnit@v2.10.3...v2.11.3). </details> Updated [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 18.10.0 to 18.10.1. <details> <summary>Release notes</summary> _Sourced from [Microsoft.NET.Test.Sdk's releases](https://github.com/microsoft/vstest/releases)._ ## 18.10.1 ## What's Changed * Isolate code coverage files in published output by @azat-msft in microsoft/vstest#16476 **Full Changelog**: microsoft/vstest@v18.10.0...v18.10.1 Commits viewable in [compare view](microsoft/vstest@v18.10.0...v18.10.1). </details> Updated [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 4.1.1 to 4.1.2. <details> <summary>Release notes</summary> _Sourced from [SixLabors.ImageSharp's releases](https://github.com/SixLabors/ImageSharp/releases)._ ## 4.1.2 ## What's Changed * Harden codec and metadata input validation by @JimBobSquarePants in SixLabors/ImageSharp#3187 * Fix TIFF decoding of legacy 8-bit color maps by @JimBobSquarePants in SixLabors/ImageSharp#3189 **Full Changelog**: SixLabors/ImageSharp@v4.1.1...v4.1.2 Commits viewable in [compare view](SixLabors/ImageSharp@v4.1.1...v4.1.2). </details> Updated [Spectre.Console](https://github.com/spectreconsole/spectre.console) from 0.57.3-alpha.0.18 to 0.57.3-alpha.0.19. <details> <summary>Release notes</summary> _Sourced from [Spectre.Console's releases](https://github.com/spectreconsole/spectre.console/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/spectreconsole/spectre.console/commits). </details> Updated [Spectre.Console.Testing](https://github.com/spectreconsole/spectre.console) from 0.57.3-alpha.0.18 to 0.57.3-alpha.0.19. <details> <summary>Release notes</summary> _Sourced from [Spectre.Console.Testing's releases](https://github.com/spectreconsole/spectre.console/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/spectreconsole/spectre.console/commits). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Sep 19, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates codec input validation, metadata handling, floating-point pixel conversion and CCITT encoding on
release/4.1.x. The fixes use supplied malformed inputs and targeted regression cases, while retaining the distinction between recoverable data errors and structural errors that prevent decoding from continuing safely.Changes
BufferedReadStream. Check BMP ICC offsets and lengths and WebP metadata lengths before allocation, account for WebP padding without overflow, and use the same range checks for JPEG segments. Preserve metadata-skip and recovery behavior, including the mandatory framing checks for WebP ICC chunks before image data.ExifProfile.Partsat the serialization boundary, including lazy profiles and profiles installed immediately before serialization. This is a shared EXIF fix, not a WebP-only filter.Numerics.Clampconsistent across scalar, vector and floating-point span overloads: NaN maps to the lower bound and infinities clamp to the endpoints. Use that contract in scaled half-pixel conversions, with matching individual-pixel and bulk behavior. Native IEEE packing remains unchanged; no clamp is added to histogram equalization or luminance indexing, andTensorPrimitives_is unchanged.IgnoreImageDatapermits recovery. Handle incomplete zlib initialization without dereferencing a null stream.Regression coverage and validation
Coverage includes supplied PNG, ICC and TIFF payloads, metadata integrity and skip options, floating-point scalar/bulk conversion parity, CCITT pixel round trips, and EXR block recovery. EXR tests distinguish missing or truncated zlib headers from a complete zlib stream that inflates to zero bytes, using deterministic empty-stream bytes across runtimes.
At
b11f2eb64, all eight build/test matrix jobs passed in CI run 33940269331: .NET 8 and .NET 10 on Windows, macOS, Ubuntu x64 and Ubuntu ARM64 runners.Local Release builds also passed, followed by 93 EXR tests on each of .NET 8 and .NET 10 through VSTest, with no failures or skips.