
Checkpatch.pl uses the misspelled words from spelling.txt both as keys of a hash and as part of a regular expression. For usage in the regular expression special characters like the plus sign need to be escaped.
Escape special characters in the list of misspelled words.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b8eb57f38c7..cee60e390e7 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -942,7 +942,7 @@ if ($codespell) { } }
-$misspellings = join("|", sort keys %spelling_fix) if keys %spelling_fix; +$misspellings = join("|", map{quotemeta($_)} sort keys %spelling_fix) if keys %spelling_fix;
sub read_words { my ($wordsRef, $file) = @_;