Skip to content

Reject and propagate invalid ISO gain-map metadata - #456

Open
gregbenz wants to merge 1 commit into
google:mainfrom
gregbenz:codex/validate-iso-gainmap-metadata
Open

Reject and propagate invalid ISO gain-map metadata#456
gregbenz wants to merge 1 commit into
google:mainfrom
gregbenz:codex/validate-iso-gainmap-metadata

Conversation

@gregbenz

@gregbenz gregbenz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • propagate HEIF/AVIF gain-map metadata parsing and conversion errors during probe
  • reject reversed rational boost bounds that float conversion can conceal
  • release libheif resources when direct AVIF/HEIF decoding encounters invalid metadata

Why

Current main validates converted gain-map descriptors, but HEIF/AVIF probing can still discard metadata errors and report success. Comparing the original rational values also catches invalid bounds that become indistinguishable after float rounding.

Testing

  • confirmed both regressions fail on current main and pass with this change
  • passed the complete 1,297-test suite
  • passed focused AddressSanitizer tests

@google-cla

google-cla Bot commented Aug 18, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gregbenz
gregbenz marked this pull request as ready for review August 18, 2026 19:29
@gregbenz
gregbenz force-pushed the codex/validate-iso-gainmap-metadata branch from d1ad4ff to 2d85daf Compare August 29, 2026 18:48
@gregbenz gregbenz changed the title Validate decoded ISO gain-map numeric metadata Reject and propagate invalid ISO gain-map metadata Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant