-
Notifications
You must be signed in to change notification settings - Fork 515
fix(rust): Handle NULL file pointer in ccxr_demuxer_open for UDP/TCP input #1851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…input When using --udp or --tcp options, ccxr_demuxer_open() was called with a NULL file pointer, causing a crash in CStr::from_ptr(). The fix checks if the file pointer is NULL before dereferencing it, and uses an empty string for network input modes. Fixes #1846 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 138ccd0...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit a0593c6...:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
All tests passing on the master branch were passed completely. Check the result page for more info. |
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