mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* checkpatch: Improve parse_email signature checking
@ 2018-02-14 18:10 Joe Perches
  0 siblings, 0 replies; only message in thread
From: Joe Perches @ 2018-02-14 18:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andy Whitcroft, LKML, Dmitry Vyukov

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.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3d4040322ae1..2b8397da39d3 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-14 18:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 18:10 checkpatch: Improve parse_email signature checking Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome