[tools] testbot/LogUtils: Defend against invalid .errors lines.

Francois Gouget fgouget at codeweavers.com
Mon Feb 24 17:14:09 CST 2020


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/LogUtils.pm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index e309753188..4cc8aaa413 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -855,7 +855,13 @@ sub LoadLogErrors($)
     $LineNo++;
     chomp $Line;
     my ($Type, $Property, $Value) = split / /, $Line, 3;
-    if ($Type eq "p")
+    if (!defined $Value)
+    {
+      $LogInfo->{BadLog} = "$LineNo: Found an invalid line";
+      last;
+    }
+    # else $Type, $Property and $Value are all defined
+    elsif ($Type eq "p")
     {
       if (!defined $LogInfo->{$Property})
       {
-- 
2.20.1




More information about the wine-devel mailing list