Commit 5dd1c6db authored by Lubomir Rintel's avatar Lubomir Rintel 🥕 Committed by Thomas Haller

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: d66a1ace ('contrib/checkpatch: avoid command injection in checkpatch.pl script')
(cherry picked from commit f3f8e21b)
parent ae23ef8b
......@@ -105,7 +105,7 @@ sub check_commit
my $commit_id;
my $commit_message;
if ($commit =~ /^([0-9a-f]{5,})$/) {
if ($commit =~ /^([0-9a-f]{5,})\b/) {
$commit_id = $1;
} else {
return unless $required;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment