Skip to content

Add bounds check in Tags::fetchTrack to prevent heap buffer overflow#94

Open
SAY-5 wants to merge 1 commit into
TechSmith:mainfrom
SAY-5:fix-fetchtrack-oob
Open

Add bounds check in Tags::fetchTrack to prevent heap buffer overflow#94
SAY-5 wants to merge 1 commit into
TechSmith:mainfrom
SAY-5:fix-fetchtrack-oob

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 9, 2026

Copy link
Copy Markdown

When a malformed file carries a trkn metadata atom whose data value is shorter than 6 bytes, fetchTrack reads value[2] through value[5] past the end of the heap buffer. The other fetch helpers have the same shape, but this is the one reported in #90; mp4info crashes under AddressSanitizer on such a file. This adds a valueSize >= 6 check alongside the existing NULL guard so the short value is skipped instead. Fixes #90.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

src/Tags.cpp:480 Heap Buffer Overflow in mp4v2::impl::itmf::Tags::fetchTrack

1 participant