fix(decoder): handle insufficient bytes in process_p16 and add unit test#2289
fix(decoder): handle insufficient bytes in process_p16 and add unit test#2289Esha310 wants to merge 2 commits into
Conversation
Updated the `process_p16` method to check for sufficient data bytes before processing, logging a warning if the input is inadequate. Added a unit test to verify behavior when insufficient bytes are provided.
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 2feb09a...:
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. |
Hi, I'm trying to check the CI results to understand why the tests aren't passing, but the link (sampleplatform.ccextractor.org) seems to be timing out for me. Could you please let me know if this is a known issue, or if there's another way I can view the test results? |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 2feb09a...:
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. |
Updated the
process_p16method to check for sufficient data bytes before processing, logging a warning if the input is inadequate. Added a unit test to verify behavior when insufficient bytes are provided.In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Repro instructions:
The reproduction steps and the crashing MPEG-2 TS sample file are already provided by the original reporter in the linked issue.
Fixes #2278
This PR resolves the index out of bounds panic in service_decoder.rs that occurs when processing certain broadcast MPEG-2 files. Added a check to ensure sufficient data bytes exist in the block before processing p16, logging a warning instead of crashing. Also included a unit test to verify this behavior.