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]
Date:	Fri, 13 Jun 2014 02:30:22 -0700
From:	Joe Perches <joe@...ches.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Andy Whitcroft <apw@...onical.com>, linux-kernel@...r.kernel.org
Subject: Re: [patch] checkpatch: warn on missing spaces in broken up quoted
 strings

On Fri, 2014-06-13 at 09:53 +0300, Dan Carpenter wrote:
> Checkpatch already complains when people break up quoted strings but
> it's still pretty common.  One mistake that people often make is they
> leave out the space character between the two strings.
> 
> This check adds 453 new warnings.  There very few false positives, here
> is what they look like:
> 
> 1) Most of the false positives are in crypto/testmgr.h where they just
>    want a 10x10 block of sample text and don't care about the content.
> 2) There one commented place like this:
>   "das08-aoh"
>   "das08-aol"
> 3) There is one place which breaks the alphabet at the lower and upper
>    case boundary.
> 4) There is one person who broke quoted strings at the 80 character mark
>    without considering the content (that's not really a false positive,
>    now that I think about it).
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> +# check for missing a space in a string concatination
> +        if ($prevrawline =~ /[^\\][a-zA-Z]"$/ && $rawline =~ /^\+[\t ]+"[a-zA-Z]/) {
> +            WARN('MISSING_SPACE',
> +                 "break quoted strings at a space character\n" . $hereprev);
> +        }

Probably want digits too so maybe \w instead of "[a-zA-Z]/


--
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