Francois Gouget : winetest/build-index: Report invalid build directories.

Alexandre Julliard julliard at winehq.org
Thu Jun 15 05:10:22 CDT 2017


Module: tools
Branch: master
Commit: bb3c31eae70e81e593df3a2147e4baa9a1435e50
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=bb3c31eae70e81e593df3a2147e4baa9a1435e50

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jun 15 01:44:21 2017 +0200

winetest/build-index: Report invalid build directories.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/build-index | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/winetest/build-index b/winetest/build-index
index 2c1cbaf..f2e3dcf 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);




More information about the wine-cvs mailing list