Skip to content

enforce minimum FileTypeBox length in Jp2Image::readMetadata#9313

Open
netliomax25-code wants to merge 1 commit into
Exiv2:mainfrom
netliomax25-code:jp2-filetypebox-length-underflow
Open

enforce minimum FileTypeBox length in Jp2Image::readMetadata#9313
netliomax25-code wants to merge 1 commit into
Exiv2:mainfrom
netliomax25-code:jp2-filetypebox-length-underflow

Conversation

@netliomax25-code
Copy link
Copy Markdown

A crafted FileTypeBox with length < 8 underflows box.length - boxHSize:

Blob boxData(box.length - boxHSize);  // 2 - 8 -> 18446744073709551610

so the vector ctor throws std::length_error instead of the contracted Exiv2 error. The uuid boxes below already guard this.

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