Skip to content
Permalink
Browse files Browse the repository at this point in the history
protect against deep recursion of directories
  • Loading branch information
hannob committed Jun 9, 2020
1 parent db33d9c commit 83a6b55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion freewvs
Expand Up @@ -109,7 +109,11 @@ if opts.xml:
# start the search

for fdir in opts.dirs:
for root, _, files in os.walk(fdir):
for root, dirs, files in os.walk(fdir):
# this protects us against nested directories causing
# an exception
if root.count(os.sep) > 500:
del dirs[:]
for filename in scanfiles.intersection(files):
for item in jconfig:
if not opts.thirdparty and 'thirdparty' in item:
Expand Down

0 comments on commit 83a6b55

Please sign in to comment.