mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1851] fix(rust): Handle NULL file pointer in ccxr_demuxer_open for UDP/TCP input #2615
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/1851
State: closed
Merged: Yes
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