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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Dec 2017 14:17:16 +0000
From:   Jeremy Sowden <jeremy@...zel.net>
To:     linux-kernel@...r.kernel.org, joe@...ches.com, apw@...onical.com
Cc:     Jeremy Sowden <jeremy@...zel.net>
Subject: [PATCH] checkpatch: fix for stripping brackets from macros.

When checking macros, checkpatch.pl strips parentheses, square brackets
and braces.  However, the search-and-replace expression was not correct,
and instead of replacing the brackets and their contents with just the
contents, it was replacing them with literal 1's.

Signed-off-by: Jeremy Sowden <jeremy@...zel.net>
---
 scripts/checkpatch.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 168687ae24fa..3b67646df845 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4874,9 +4874,9 @@ sub process {
 			$dstat =~ s/\s*$//s;
 
 			# Flatten any parentheses and braces
-			while ($dstat =~ s/\([^\(\)]*\)/1/ ||
-			       $dstat =~ s/\{[^\{\}]*\}/1/ ||
-			       $dstat =~ s/.\[[^\[\]]*\]/1/)
+			while ($dstat =~ s/\(([^\(\)]*)\)/$1/ ||
+			       $dstat =~ s/\{([^\{\}]*)\}/$1/ ||
+			       $dstat =~ s/.\[([^\[\]]*)\]/$1/)
 			{
 			}
 

base-commit: 53600ecfb6004f355bd3551bee180caf4b42d7a7
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ