[Tools] winetest/build-index: Report invalid build directories.

Francois Gouget fgouget at codeweavers.com
Wed Jun 14 18:44:21 CDT 2017


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 winetest/build-index | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/winetest/build-index b/winetest/build-index
index 2c1cbafa..f2e3dcf6 100755
--- a/winetest/build-index
+++ b/winetest/build-index
@@ -199,8 +199,12 @@ my @too_old;
 opendir(DIR, "data") or die "could not open the 'data' directory: $!";
 foreach my $build (readdir(DIR))
 {
-    next if $build =~ /^\./;
-    next unless $build =~ /^[-.0-9a-zA-Z]+$/;
+    next if ($build =~ /^(\.\.?|index\.html|errors\.html|tests)$/);
+    if ($build !~ /^[0-9a-f]{40}$/)
+    {
+        error("'data/$build' is not a valid build directory\n");
+        next;
+    }
     next unless -f "data/$build/index.html";
 
     my ($date, $subject) = get_build_info($build);
-- 
2.11.0



More information about the wine-patches mailing list