diff --git a/cve_bin_tool/util.py b/cve_bin_tool/util.py index d0865a4f44..6c9d5b247c 100644 --- a/cve_bin_tool/util.py +++ b/cve_bin_tool/util.py @@ -364,7 +364,7 @@ def walk(self, roots: list[str] | None = None) -> Iterator[str]: for root in roots: for dirpath, dirnames, filenames in os.walk(root): # Filters - for filename in filenames: + for filename in filenames.copy(): try: if ( not self.pattern_match(