mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-27 16:40:07 +00:00
[PR #2036] fix: process_word_file propagates errors instead of panicking #2843
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/2036
State: closed
Merged: Yes
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Description
The process_word_file function reads lines from a file and previously used line.unwrap() to extract each line. This is unsafe because:
Fix
Example
Valid UTF-8 line --> Works
Line with invalid UTF-8 (0xFF) --> Returns Err