Skip to content

Guard against null handler type in MP4File::GenerateTracks#97

Open
SAY-5 wants to merge 1 commit into
TechSmith:mainfrom
SAY-5:guard-null-handlertype-generatetracks
Open

Guard against null handler type in MP4File::GenerateTracks#97
SAY-5 wants to merge 1 commit into
TechSmith:mainfrom
SAY-5:guard-null-handlertype-generatetracks

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 20, 2026

Copy link
Copy Markdown

When generating tracks, the handler type from trak.mdia.hdlr.handlerType is passed directly to strcmp against the hint track type. On a file where that property exists but its string value is null, strcmp(NULL, ...) dereferences a null pointer and crashes. Read the value once and only compare when it is non-null; a null handler type simply falls through to a regular track. Fixes #87.

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/mp4file.cpp:472 NULL Pointer Dereference in mp4v2::impl::MP4File::GenerateTracks

1 participant