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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5f5fbc7-d01f-05e1-f8ac-c1db8ba5fd9e@gmail.com>
Date:   Sun, 8 Apr 2018 10:12:07 +0800
From:   Jia He <hejianet@...il.com>
To:     Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>
Cc:     linux-kernel@...r.kernel.org, Jia He <jia.he@...-semitech.com>
Subject: Re: [PATCH] checkpatch: relax check for revert commit

Hi Andy & Joe

Although it is minor, it is a real bug, I thought.

Is there any comment? Thank you

---

Cheers,

Jia


On 4/2/2018 10:28 PM, Jia He Wrote:
> For revert commit, it might has two double quotation marks in its
> commit log.
>
> Relax the check condition for revert commit to avoid checkpatch
> errors.
>
> Signed-off-by: Jia He <jia.he@...-semitech.com>
> ---
>   scripts/checkpatch.pl | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 3d40403..96138d6 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2643,20 +2643,20 @@ sub process {
>   			$long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
>   			$space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
>   			$case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
> -			if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
> +			if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.*)"\)/i) {
>   				$orig_desc = $1;
>   				$hasparens = 1;
>   			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
>   				 defined $rawlines[$linenr] &&
> -				 $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
> +				 $rawlines[$linenr] =~ /^\s*\("(.*)"\)/) {
>   				$orig_desc = $1;
>   				$hasparens = 1;
> -			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
> -				 defined $rawlines[$linenr] &&
> -				 $rawlines[$linenr] =~ /^\s*[^"]+"\)/) {
> -				$line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
> +		       } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\(".*$/i &&
> +				defined $rawlines[$linenr] &&
> +				$rawlines[$linenr] =~ /^\s*.*"\)/) {
> +				$line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.*)$/i;
>   				$orig_desc = $1;
> -				$rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
> +				$rawlines[$linenr] =~ /^\s*(.*)"\)/;
>   				$orig_desc .= " " . $1;
>   				$hasparens = 1;
>   			}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ