scripts/get_maintainer.pl: fix possible infinite loop
authorJoe Perches <joe@perches.com>
Fri, 5 Mar 2010 21:43:07 +0000 (13:43 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 16:07:05 +0000 (09:07 -0700)
commitc54f376268f49f0fceebe06c7079b75da3ed0e74
treecd5e5ff414dc2e4a4f4ec2a417bfbac9aabad315
parenta8fe08331a02dda324267364d3f7cafb94ae60ff
scripts/get_maintainer.pl: fix possible infinite loop

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