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, 28 Dec 2018 15:49:01 +0100
From:   Julia Lawall <Julia.Lawall@...6.fr>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     kernel-janitors@...r.kernel.org,
        Gilles Muller <Gilles.Muller@...6.fr>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Michal Marek <michal.lkml@...kovi.net>, cocci@...teme.lip6.fr,
        linux-kernel@...r.kernel.org,
        "Jason A . Donenfeld" <zx2c4@...nel.org>
Subject: [PATCH] scripts/coccinelle: check for redeclaration

Avoid reporting on the use of an iterator index variable when
the variable is redeclared.

Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>

---
 scripts/coccinelle/iterators/use_after_iter.cocci |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/iterators/use_after_iter.cocci
index ce8cc9c..66a1140 100644
--- a/scripts/coccinelle/iterators/use_after_iter.cocci
+++ b/scripts/coccinelle/iterators/use_after_iter.cocci
@@ -35,6 +35,7 @@ iterator name hlist_for_each_entry_from;
 iterator name hlist_for_each_entry_safe;
 statement S;
 position p1,p2;
+type T;
 @@
 
 (
@@ -125,6 +126,8 @@ sizeof(<+...c...+>)
 |
  &c->member
 |
+T c;
+|
 c = E
 |
 *c@p2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ