mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #2005] [MERGED] fix: Prevent NULL pointer dereference in DVB subtitle decoder #2805
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/2005
Author: @cfsmp3
Created: 1/10/2026
Status: ✅ Merged
Merged: 1/10/2026
Merged by: @cfsmp3
Base:
master← Head:fix/dvb-subtitle-null-region-crash📝 Commits (1)
1bd4cd5fix: Prevent NULL pointer dereference in DVB subtitle decoder📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/lib_ccx/dvb_subtitle_decoder.c(+1 -1)📄 Description
Summary
regionbefore accessingregion->bgcolorin the OCR processing block ofwrite_dvb_sub()Problem
When processing DVB subtitles, the
write_dvb_sub()function iterates through display items callingget_region(). After the loop, if all regions returned NULL, theregionvariable remains NULL. The code then attempts to accessregion->bgcolorin the OCR block, causing a segmentation fault.Crash details:
bgcolorfield inDVBSubRegionstructRoot Cause
Fix
Add
&& regionto the condition before the OCR block.Test Plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.