Skip to content

fix out-of-bounds iterator in readStringWcharTag#9310

Open
netliomax25-code wants to merge 1 commit into
Exiv2:mainfrom
netliomax25-code:fix-readstringwchar-oob
Open

fix out-of-bounds iterator in readStringWcharTag#9310
netliomax25-code wants to merge 1 commit into
Exiv2:mainfrom
netliomax25-code:fix-readstringwchar-oob

Conversation

@netliomax25-code
Copy link
Copy Markdown

readStringWcharTag() builds its result from FieldBuf.end() - 3, which points before the start of the buffer when length < 2, so the std::string is constructed from an inverted iterator range. A crafted ASF Content_Description with a 1-byte string length reaches it through contentDescription(). Require length >= 2.

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