-
Notifications
You must be signed in to change notification settings - Fork 476
fix: rust bitstream segfault #1732
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
a36e32e
to
85ac1aa
Compare
85ac1aa
to
47646d7
Compare
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 6300bb7...:
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. |
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 39e051b...:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This PR fixes a bug where an "exhausted" C bitstream (one that has been fully read, where pos == end) would lose its buffer context when converted to Rust and back. The current logic treats this state the same as an uninitialized stream causing the original buffer location to be lost.
The fix ensures that even an exhausted stream creates a zero-length Rust slice that retains the original base pointer so that the pointers are preserved during the conversions.