fix: check RAND_bytes during shred#9
Conversation
|
Hi @nanookclaw, Thanks for jumping in so quickly, having another pair of eyes on this is always appreciated! 😊 If you'd like to dive in deeper as a contributer: The project is a bit opaque about where assets live and it's a bit tricky to set up your own assets which means runtime testing can be quite cumbersome, if you'd like to test locally yourself here are two easy ways to get you up and running in case you want to be more hands-on for future issues:
Let me know if you need support and we can arrange something, and thanks again for volunteering and helping improve Seal, you're always welcome to work on future issues! 🦭 Alex |
|
Appreciate the review and the setup notes. I’ll wait for the current CI run to settle; if anything fails, I’ll follow up on this branch. I’ll skip Discord for now so the contribution trail stays on GitHub, but the asset-layout context is useful for future Seal issues. |
What changed
shredFilenow checks the return value fromRAND_bytesbefore writing each random overwrite chunk. If OpenSSL reports a failure, the function logs the failed pass, closes the file handle, and returnsfalseinstead of continuing with stale buffer contents and later deleting the file.This mirrors the existing failure handling around seek/write operations in the same loop and leaves the zero-fill pass unchanged.
Closes #7.
Verification
git diff --checkI could not run the full Windows/MSVC/vcpkg test workflow from this Linux environment, and
clang-formatis not installed here.