Skip to content

enforce minimum FileTypeBox length in Jp2Image::printStructure#9318

Open
netliomax25-code wants to merge 1 commit into
Exiv2:mainfrom
netliomax25-code:jp2-printstructure-filetype-underflow
Open

enforce minimum FileTypeBox length in Jp2Image::printStructure#9318
netliomax25-code wants to merge 1 commit into
Exiv2:mainfrom
netliomax25-code:jp2-printstructure-filetype-underflow

Conversation

@netliomax25-code
Copy link
Copy Markdown

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.

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