mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-28 17:10:33 +00:00
[PR #1807] fix(lib_ccx): replace unsafe string functions with bounds-checked versions #2548
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?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1807
State: closed
Merged: Yes
Summary
Replace sprintf/strcpy/strcat with bounds-checked versions in files identified in Phase 3.1 of the buffer safety audit. This completes all dangerous function pattern fixes.
Files Modified
Medium Priority (previous commit)
Low Priority (latest commit)
Notable Fixes
ccx_encoders_splitbysentence.c: Fixed undefined behavior where
strcpy()was used with overlapping memory regions. Replaced withmemmove().ccx_encoders_curl.c: Added OOM check for malloc allocation that was previously unchecked.
lib_ccx.c: Fixed buffer size calculation - was allocating
strlen + 10but neededstrlen + 12for the format string.matroska.c: Protected against malformed language codes that could cause buffer overflow from untrusted file input.
Test plan
🤖 Generated with Claude Code