lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 18 Jul 2018 04:59:04 -0700
From:   Joe Perches <joe@...ches.com>
To:     Geert Uytterhoeven <geert+renesas@...der.be>,
        Andy Whitcroft <apw@...onical.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: Only encode UTF-8 quoted printable mail
 headers

On Wed, 2018-07-18 at 13:35 +0200, Geert Uytterhoeven wrote:
> As PERL uses its own internal character encoding, always calling
> encode("utf8", ...) on the author name may cause corruption, leading to
> an author signoff mismatch.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2523,7 +2523,8 @@ sub process {
>  
>  # Check the patch for a From:
>  		if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
> -			$author = encode("utf8", $1);
> +			$author = $1;
> +			$author = encode("utf8", $author) if $line =~ /=\?utf-8\?/i;

trivial:

checkpatch uses parentheses around tests so

			$author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ