mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1934] prevent heap buffer overflow in Teletext demux path #2735
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?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1934
State: closed
Merged: Yes
[FIX] Prevent heap buffer overflow in Teletext demux path
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Summary
This pull request fixes a heap buffer overflow in the Teletext demux path
(
CCX_CODEC_TELETEXT) in the functioncopy_capbuf_demux_datain
src/lib_ccx/ts_functions.c.Details
Previously, the code copied
cinfo->capbufinto the destination bufferwithout verifying that there was enough space remaining:
If capbuflen exceeded the remaining buffer space, this caused a heap
buffer overflow, potentially leading to memory corruption or crash.
The generic PES/DVB path already performed a bounds check, but the
Teletext path was missing this validation.
Fix
A bou
nds check is added before copying the Teletext data:
Fixes #1933