From 2ad4b13f78342d38c305be29acb55e1d93985da0 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Fri, 27 Dec 2013 01:53:35 -0500 Subject: [PATCH] fix Use of uninitialized value within @a2 in pattern match (m//) at BuildKitUtils.pm line 273 --- xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm b/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm index 9a0dc30a4..df652727c 100644 --- a/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm +++ b/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm @@ -268,6 +268,8 @@ sub testVersion for (my $i = 0 ; $i < $len ; $i++) { # remove any non-numbers on the end + if(defined($a1[$i])&&defined($a2[$i])) + { my ($d1) = $a1[$i] =~ /^(\d*)/; my ($d2) = $a2[$i] =~ /^(\d*)/; @@ -287,6 +289,7 @@ sub testVersion $num1 .= $d1; $num2 .= $d2; } + } } # Remove the leading 0s or perl will interpret the numbers as octal