Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85e12066 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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: default avatar <syzbot+bbd8e9a06452cc48059b@syzkaller.appspotmail.com>

Do so.

Link: http://lkml.kernel.org/r/1518631805.3678.12.camel@perches.com


Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 68c1f082
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1075,7 +1075,7 @@ sub parse_email {
	} elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) {
	} elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) {
		$address = $1;
		$address = $1;
		$comment = $2 if defined $2;
		$comment = $2 if defined $2;
		$formatted_email =~ s/$address.*$//;
		$formatted_email =~ s/\Q$address\E.*$//;
		$name = $formatted_email;
		$name = $formatted_email;
		$name = trim($name);
		$name = trim($name);
		$name =~ s/^\"|\"$//g;
		$name =~ s/^\"|\"$//g;