mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-18 12:03:00 +00:00
[PR #1949] [CLOSED] Prevent integer overflow in EIA-608 screen buffer reallocation #2749
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/1949
Author: @THE-Amrit-mahto-05
Created: 1/1/2026
Status: ❌ Closed
Base:
master← Head:fix/eia608-integer-overflow📝 Commits (1)
7526da8Prevent integer overflow in EIA-608 screen buffer reallocation📊 Changes
1 file changed (+24 additions, -4 deletions)
View changed files
📝
src/lib_ccx/ccx_decoders_608.c(+24 -4)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
[FIX] Prevent integer overflow in EIA-608 screen buffer allocation
Description
This PR fixes a potential integer overflow in the EIA-608 decoder, which could lead to a heap buffer overflow when processing malformed subtitle input.
Component: EIA-608 decoder
File:
src/lib_ccx/ccx_decoders_608.cFunctions:
write_cc_buffer,write_cc_lineProblem
The screen buffer was being reallocated using:
without checking for integer overflow. If sub->nb_data is extremely large (due to a malformed or crafted subtitle), this multiplication could wrap around, causing a tiny buffer allocation and heap overflow on subsequent writes.
Fix
Impact
Fixes #1948
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.