mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +00:00
[PR #1866] [MERGED] fix(security): Add bounds checks for buffer overflow vulnerabilities #2637
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/1866
Author: @cfsmp3
Created: 12/20/2025
Status: ✅ Merged
Merged: 12/21/2025
Merged by: @cfsmp3
Base:
master← Head:fix/1427-1428-buffer-overflows📝 Commits (1)
9fddaabfix(security): Add bounds checks for buffer overflow vulnerabilities📊 Changes
2 files changed (+47 additions, -3 deletions)
View changed files
📝
src/lib_ccx/avc_functions.c(+9 -0)📝
src/lib_ccx/ts_tables.c(+38 -3)📄 Description
Summary
Fixes two buffer overflow vulnerabilities reported in issues #1427 and #1428:
#1428 (Global buffer overflow in slice_header): The
slice_typevalue read from H.264 exp-golomb data was used to indexslice_types[]array (10 elements) without bounds checking. Malformed H.264 data withslice_type >= 10would cause out-of-bounds read. Now validatesslice_type < 10before use per H.264 spec Table 7-6.#1427 (Heap buffer overflow in parse_PMT):
ES_info_lengthfrom PMT descriptor data was trusted without validation against buffer bounds. Malformed PMT with excessiveES_info_lengthcould read past the allocated buffer. Now validatesES_info_lengthand descriptor lengths against the actual buffer size.Both issues were discovered using AddressSanitizer with crafted TS files.
Changes
src/lib_ccx/avc_functions.c: Added validation forslice_typevalue inslice_header()functionsrc/lib_ccx/ts_tables.c: Added multiple bounds checks inparse_PMT()for ES_info descriptor parsingTest plan
Fixes #1427
Fixes #1428
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.