Skip to content

fix: unsafe read usage with find output #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdqst
Copy link

@mdqst mdqst commented Apr 9, 2025

Description

Replaced a potentially unsafe use of read in a while loop fed by find. The previous version could misinterpret filenames containing spaces, tabs, or special characters. Updated it to use find -print0 and read -r -d '' for safe and reliable parsing. This is especially important when working with external file sources like git submodules or CI environments.

How Has This Been Tested?

Tested locally with files containing spaces, tabs, and special characters in their names. Confirmed that all paths are correctly processed without breaking.

Checklist:

Before deployment

  • 100% test and branch coverage
  • check slither for severe issues
  • fuzz and invariant tests (when applicable)
  • formal verification (when applicable)
  • deployment or upgrade scripts ready

After deployment

  • transfer ownership after deployments (when applicable)
  • complete upgrade (when applicable)
  • generate deployment/upgrade log files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant