mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #2019] [MERGED] fix(matroska): prevent out-of-bounds NAL parsing in AVC/HEVC blocks #2822
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/2019
Author: @Akki2005
Created: 1/14/2026
Status: ✅ Merged
Merged: 1/17/2026
Merged by: @cfsmp3
Base:
master← Head:gsoc-demuxer-audit📝 Commits (2)
b1c2aabfix(matroska): prevent out-of-bounds NAL parsing in AVC/HEVC blocksed26a59style(matroska): apply clang-format📊 Changes
1 file changed (+26 additions, -5 deletions)
View changed files
📝
src/lib_ccx/matroska.c(+26 -5)📄 Description
This patch hardens Matroska AVC/HEVC parsing by making NAL length extraction safe on malformed or truncated input.
Previously, NAL length was read via a direct cast to a long pointer, which could result in:
The updated logic:
Behavior for valid Matroska streams remains unchanged.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.