Skip to content

enforce minimum FileTypeBox length in Jp2Image::printStructure (backport #9318)#9352

Closed
mergify[bot] wants to merge 1 commit into
0.29.xfrom
mergify/bp/0.29.x/pr-9318
Closed

enforce minimum FileTypeBox length in Jp2Image::printStructure (backport #9318)#9352
mergify[bot] wants to merge 1 commit into
0.29.xfrom
mergify/bp/0.29.x/pr-9318

Conversation

@mergify

@mergify mergify Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

exiv2 -pS on a JP2 whose FileTypeBox sets its length below the 8-byte box header:

   12 |        2 | ftyp      | Uncaught exception: vector

box.length - boxHSize underflows, so Blob is sized to near SIZE_MAX and std::vector throws std::length_error rather than an Exiv2::Error. The sibling sub-box and uuid cases already guard length; this adds the same check before the FileTypeBox allocation.


This is an automatic backport of pull request #9318 done by [Mergify](https://mergify.com).

@kmilos

kmilos commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Dropping as plan is to forward the 0.29.x branch closer to the release.

@kmilos kmilos closed this Jun 22, 2026
@kmilos kmilos deleted the mergify/bp/0.29.x/pr-9318 branch June 22, 2026 09:33
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.

2 participants