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-next>] [day] [month] [year] [list]
Date:	Fri, 18 Jan 2008 22:21:00 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	apw@...dowen.org, rdunlap@...otime.net, jschopp@...tin.ibm.com
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.24-rc8-mm1] checkpatch.pl -- Handle backslashes within quoted string.

checkpatch.pl was unable to handle \\ within quoted string.

+static void test(char *sp, char *dp)
+{
+       if (*sp == '\\') {
+               *dp++ = '\\';
+               *dp++ = '\\';
+       }
+}

I hope this patch can fix it.
But I don't know whether there is a side effect or not.
Should we use "X" rather than "\\"?

Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
---
 scripts/checkpatch.pl |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- linux-2.6-mm.orig/scripts/checkpatch.pl
+++ linux-2.6-mm/scripts/checkpatch.pl
@@ -276,6 +276,11 @@ sub sanitise_line {
 	my $quote = '';
 
 	foreach my $c (split(//, $line)) {
+		if ($quote && $l eq "\\" && $c eq "\\") {
+			$res .= "\\";
+			$l = '';
+			next;
+		}
 		if ($l ne "\\" && ($c eq "'" || $c eq '"')) {
 			if ($quote eq '') {
 				$quote = $c;
@@ -286,7 +291,7 @@ sub sanitise_line {
 				$quote = '';
 			}
 		}
-		if ($quote && $c ne "\t") {
+		if ($quote && $c ne "\t" && $c ne "\\") {
 			$res .= "X";
 		} else {
 			$res .= $c;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ