mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1851] [MERGED] fix(rust): Handle NULL file pointer in ccxr_demuxer_open for UDP/TCP input #2611
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/1851
Author: @cfsmp3
Created: 12/19/2025
Status: ✅ Merged
Merged: 12/19/2025
Merged by: @cfsmp3
Base:
master← Head:fix/issue-1846-udp-tcp-crash📝 Commits (1)
6c44100fix(rust): Handle NULL file pointer in ccxr_demuxer_open for UDP/TCP input📊 Changes
1 file changed (+9 additions, -4 deletions)
View changed files
📝
src/rust/src/libccxr_exports/demuxer.rs(+9 -4)📄 Description
Summary
Fixes #1846
When using
--udpor--tcpoptions,ccxr_demuxer_open()was called with a NULL file pointer, causing a crash inCStr::from_ptr().Root Cause
The Rust FFI function
ccxr_demuxer_openassumed thefileparameter was always a valid C string pointer:For network input modes (UDP/TCP), the C code passes NULL since there's no file to open.
Fix
Check if the file pointer is NULL before dereferencing:
Testing
Verified both UDP and TCP modes work:
Test Plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.