aboutsummaryrefslogtreecommitdiff
path: root/scripts/get_maintainer.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-03-05 13:43:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 11:26:34 -0800
commit3c840c18bcd8efb37f1a565e83a9509e1ea5d105 (patch)
treecf1a0d872188bf3857354a8622fff3e7dc0c0709 /scripts/get_maintainer.pl
parenta63ceb4c36a7674f7efa90e8ba96b44a3989d717 (diff)
scripts/get_maintainer.pl: fix possible infinite loop
If MAINTAINERS section entries are misformatted, it was possible to have an infinite loop. Correct the defect by always moving the index to the end of section + 1 Also, exit check for exclude as soon as possible. Signed-off-by: Joe Perches <joe@perches.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/get_maintainer.pl')
-rwxr-xr-xscripts/get_maintainer.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index b61002dceab..f76f3d13276 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -347,6 +347,7 @@ foreach my $file (@files) {
if ($type eq 'X') {
if (file_match_pattern($file, $value)) {
$exclude = 1;
+ last;
}
}
}
@@ -373,8 +374,7 @@ foreach my $file (@files) {
}
}
- $tvi += ($end - $start);
-
+ $tvi = $end + 1;
}
foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {