From patchwork Thu Mar 1 22:03:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobin Harding X-Patchwork-Id: 10252661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FBF56037D for ; Thu, 1 Mar 2018 22:04:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D6DD28658 for ; Thu, 1 Mar 2018 22:04:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 219BE28678; Thu, 1 Mar 2018 22:04:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 64D6D28658 for ; Thu, 1 Mar 2018 22:04:10 +0000 (UTC) Received: (qmail 28280 invoked by uid 550); 1 Mar 2018 22:03:57 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 28194 invoked from network); 1 Mar 2018 22:03:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobin.cc; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=aE88WhNEM1RWMwmNE 0en7qQyFse/3m+degho9/T+LUw=; b=QeMXr02wxLxPewdfPF2LGpEj48OP+UQoa UU+5Igm6W13yTyIOvaq4wl0qiDBZhj//5ofx2W0exclwLHP/cJLR7pJBOUOpIjki QgJU1aYONqT1/lGqPbhpwcW/F6FRK0UoWthOALjtUHOXhG5/1MwK2f4Irdq5k8tc eyLS3Yw5d4z9px/3yd0LrbxxKndQoyNo25sdzTSWPjaAUSSDy+uqOHmsEkFuAbBE avg+0SyQGQrziVOtsKjsevac9kXMBdn8+NNF3Gt0HYsqWflzLsDri6OpgB/d21/q i8nUW3Q2MY+Q8renl8T9MPN9n+fZw8SYO0jqHeGDZoWALdrfeychQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=aE88WhNEM1RWMwmNE0en7qQyFse/3m+degho9/T+LUw=; b=BcyA3y93 Us2GhdKOJUOBqr9FTLCVkTyloAAjeUNyybCza7cyaQmfAhmFAD6OSAB8/Z/PF3pB R5CqTQyoLwd56xnP50HtN0OGWKaMdY9wK4I5hp19Zru5l/N0gSSW7Q25SlATzgiS mjTN6pUENyBhcS3Kvn5WEg7UKWvUNJ5BBrMdyrRqt9F4pu92U5tP5OeZepBqob22 Xvr+THMROMfR0Gag1w2cOAGo7DDtnCeGWF6LDfZwWSJIwhTsdyFD6EW8WG/mEx8V x55QWfSROIDv+uilXa8fPYjFY7ru+rv4gpF2rQG1/zAGwzNT2b3L+eZ9vD87Axe8 G2G8uIY5cQGldw== X-ME-Sender: From: "Tobin C. Harding" To: Kernel Hardening Cc: "Tobin C. Harding" , Tycho Andersen , LKML Subject: [PATCH 1/2] leaking_addresses: explicitly name variable used in regex Date: Fri, 2 Mar 2018 09:03:19 +1100 Message-Id: <1519941800-27710-2-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519941800-27710-1-git-send-email-me@tobin.cc> References: <1519941800-27710-1-git-send-email-me@tobin.cc> X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; }