lkml.org 
[lkml]   [2010]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 110/123] scripts/get_maintainer.pl: fix possible infinite loop
2.6.33-stable review patch.  If anyone has any objections, please let me know.

-----------------

From: Joe Perches <joe@perches.com>

commit 3c840c18bcd8efb37f1a565e83a9509e1ea5d105 upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
scripts/get_maintainer.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -314,6 +314,7 @@ foreach my $file (@files) {
if ($type eq 'X') {
if (file_match_pattern($file, $value)) {
$exclude = 1;
+ last;
}
}
}
@@ -340,8 +341,7 @@ foreach my $file (@files) {
}
}

- $tvi += ($end - $start);
-
+ $tvi = $end + 1;
}

foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {



\
 
 \ /
  Last update: 2010-03-13 01:31    [W:0.494 / U:1.344 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site