From: "Tobin C. Harding" <me@tobin.cc>
To: Kernel Hardening <kernel-hardening@lists.openwall.com>
Cc: "Tobin C. Harding" <me@tobin.cc>, Tycho Andersen <tycho@tycho.ws>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] leaking_addresses: explicitly name variable used in regex
Date: Fri, 2 Mar 2018 09:03:19 +1100 [thread overview]
Message-ID: <1519941800-27710-2-git-send-email-me@tobin.cc> (raw)
In-Reply-To: <1519941800-27710-1-git-send-email-me@tobin.cc>
Currently sub routine may_leak_address() is checking regex against Perl
special variable $_ which is _fortunately_ being set correctly in a loop
before this sub routine is called. We already have declared a variable
to hold this value '$line' we should use it.
Use $line in regex match instead of implicit $_
Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
scripts/leaking_addresses.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
index d5d31f3df97e..65a65aa64d26 100755
--- a/scripts/leaking_addresses.pl
+++ b/scripts/leaking_addresses.pl
@@ -363,7 +363,7 @@ sub may_leak_address
}
$address_re = get_address_re();
- while (/($address_re)/g) {
+ while ($line =~ /($address_re)/g) {
if (!is_false_positive($1)) {
return 1;
}
--
2.7.4
next prev parent reply other threads:[~2018-03-01 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 22:03 [PATCH 0/2] leaking_addresses: check path name for leaks Tobin C. Harding
2018-03-01 22:03 ` Tobin C. Harding [this message]
2018-03-01 22:03 ` [PATCH 2/2] leaking_addresses: check if file name contains address Tobin C. Harding
2018-03-02 0:13 ` Tycho Andersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519941800-27710-2-git-send-email-me@tobin.cc \
--to=me@tobin.cc \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tycho@tycho.ws \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®