Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 11, 2026

Review comment requested verification that the bounds check for size < 8 was present in the MP4 demuxer to prevent integer underflow when calculating box boundaries.

Status

The bounds check is already in place as of commit 789a87e. No changes required.

else if( size<8 )
{
    setParseError( MP4_PARSE_ERROR_INVALID_BOX );
    return;
}
else
{ // payload after size+type
    next = ptr + (size - 8);  // Safe: size >= 8 guaranteed
}

The check validates size >= 8 before the subtraction, preventing underflow when corrupted MP4 data contains invalid box sizes.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Address feedback on mp4demux hardening in VPLAY-12333 Confirm bounds check for standard box size in MP4Demux Jan 11, 2026
Copilot AI requested a review from pstroffolino January 11, 2026 14:51
@pstroffolino pstroffolino deleted the copilot/sub-pr-830-another-one branch January 11, 2026 14:51
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.

2 participants