mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #2015] [MERGED] [FIX] rust: add defensive length check to validate_cc_pair #2821
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?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/2015
Author: @Harsh-Sahu43
Created: 1/10/2026
Status: ✅ Merged
Merged: 1/18/2026
Merged by: @cfsmp3
Base:
master← Head:tests/validate-cc-pair📝 Commits (4)
eea0499add defensive length check to validate_cc_pair7e32d6aMerge branch 'CCExtractor:master' into tests/validate-cc-pair1447b02Fixed : formatting2d9b480Merge branch 'CCExtractor:master' into tests/validate-cc-pair📊 Changes
1 file changed (+13 additions, -0 deletions)
View changed files
📝
src/rust/src/lib.rs(+13 -0)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Summary
Adds a defensive guard to
validate_cc_pairto ensure the function onlyprocesses CC blocks of the expected length (3 bytes).
This prevents potential out-of-bounds access if the function is ever
called with malformed input. Behavior for valid CC blocks is unchanged.
Details
falseearly when the CC block slice length is not exactly 3🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.