From 85e12066ea09bbee5c99ff2dbde9934291533b0d Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 10 Apr 2018 16:33:09 -0700 Subject: checkpatch: improve parse_email signature checking Bare email addresses with non alphanumeric characters require escape quoting before being substituted in the parse_email routine. e.g. Reported-by: syzbot+bbd8e9a06452cc48059b@syzkaller.appspotmail.com Do so. Link: http://lkml.kernel.org/r/1518631805.3678.12.camel@perches.com Signed-off-by: Joe Perches Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/checkpatch.pl') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 764ffd1bb1c5..b464a4c3f863 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1075,7 +1075,7 @@ sub parse_email { } elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) { $address = $1; $comment = $2 if defined $2; - $formatted_email =~ s/$address.*$//; + $formatted_email =~ s/\Q$address\E.*$//; $name = $formatted_email; $name = trim($name); $name =~ s/^\"|\"$//g; -- cgit v1.2.3-59-g8ed1b