mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
Potential memory safety issues in Rust FFI exports (NULL pointer handling) #895
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?
Originally created by @THE-Amrit-mahto-05 on GitHub (Jan 5, 2026).
Description
While going through the Rust FFI layer, I noticed a few places where raw pointers coming from C are used without NULL checks. This can lead to undefined behavior if these functions are ever called with invalid inputs.
I’m still learning Rust FFI, so please correct me if I’m wrong, but based on my understanding these look like genuine safety issues.
What I found
ccxr_verify_crc32
ccxr_levenshtein_dist and ccxr_levenshtein_dist_char
Functions in libccxr_exports/bitstream.rs
@cfsmp3 commented on GitHub (Jan 5, 2026):
Closing, explanation in PR.