aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/get_maintainer.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-03-05 16:43:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:34 -0500
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 b61002dceaba..f76f3d13276d 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -347,6 +347,7 @@ foreach my $file (@files) {
347 if ($type eq 'X') { 347 if ($type eq 'X') {
348 if (file_match_pattern($file, $value)) { 348 if (file_match_pattern($file, $value)) {
349 $exclude = 1; 349 $exclude = 1;
350 last;
350 } 351 }
351 } 352 }
352 } 353 }
@@ -373,8 +374,7 @@ foreach my $file (@files) {
373 } 374 }
374 } 375 }
375 376
376 $tvi += ($end - $start); 377 $tvi = $end + 1;
377
378 } 378 }
379 379
380 foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { 380 foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {