Fix memory safety bug in copy_demuxer_data_from_rust#2261
Fix memory safety bug in copy_demuxer_data_from_rust#2261THE-Amrit-mahto-05 wants to merge 5 commits intoCCExtractor:masterfrom
Conversation
|
@cfsmp3 done can you review it |
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit ad4886e...:
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 ad4886e...:
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. |
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Problem
The function
copy_demuxer_data_from_rustis documented to copy buffer contents, but the implementation was incorrectly reassigning the buffer pointer:This leads to:
Reproduction
Fix
Test Improvements
Previously, the tests for copy_demuxer_data_from_rust only validated high-level properties such as buffer length. They did not verify whether the buffer contents were actually copied into the destination C memory.
As a result, the incorrect implementation:
could still pass the tests despite not performing a real memory copy.
Changes Made
The tests have been improved to explicitly validate the contents of the destination buffer. For example:
Impact