contrib/checkpatch: properly determine the commit id boundary
It doesn't have to be at the end of line, there may be more words
following.
Fixes: d66a1ace23
('contrib/checkpatch: avoid command injection in checkpatch.pl script')
This commit is contained in:
@@ -105,7 +105,7 @@ sub check_commit
|
|||||||
my $commit_id;
|
my $commit_id;
|
||||||
my $commit_message;
|
my $commit_message;
|
||||||
|
|
||||||
if ($commit =~ /^([0-9a-f]{5,})$/) {
|
if ($commit =~ /^([0-9a-f]{5,})\b/) {
|
||||||
$commit_id = $1;
|
$commit_id = $1;
|
||||||
} else {
|
} else {
|
||||||
return unless $required;
|
return unless $required;
|
||||||
|
Reference in New Issue
Block a user