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] [day] [month] [year] [list]
Message-ID: <tip-ead1a57457c0324a167f3f9e3a70e26c2d75fb12@git.kernel.org>
Date:   Tue, 4 Oct 2016 01:09:47 -0700
From:   tip-bot for Colin Ian King <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mhiramat@...nel.org, colin.king@...onical.com,
        ravi.bangoria@...ux.vnet.ibm.com, acme@...hat.com,
        wangnan0@...wei.com, tglx@...utronix.de, mingo@...nel.org,
        hpa@...or.com, alexander.shishkin@...ux.intel.com,
        linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: [tip:perf/urgent] perf probe: Check if *ptr2 is zero and not ptr2

Commit-ID:  ead1a57457c0324a167f3f9e3a70e26c2d75fb12
Gitweb:     http://git.kernel.org/tip/ead1a57457c0324a167f3f9e3a70e26c2d75fb12
Author:     Colin Ian King <colin.king@...onical.com>
AuthorDate: Mon, 3 Oct 2016 11:34:31 +0100
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 3 Oct 2016 11:24:12 -0300

perf probe: Check if *ptr2 is zero and not ptr2

Static anaylsis with cppcheck[1] detected an incorrect comparison:
[tools/perf/util/probe-event.c:216]: (warning) Char literal compared
with pointer 'ptr2'. Did you intend to dereference it?

Dereference ptr2 for the comparison to fix this.

1: https://sourceforge.net/p/cppcheck/wiki/Home/

Signed-off-by: Colin King <colin.king@...onical.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@...wei.com>
Fixes: 35726d3a4ca9 ("perf probe: Fix to cut off incompatible chars from group name")
Link: http://lkml.kernel.org/r/20161003103431.18534-1-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/probe-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index fcfbef0..d281ae2 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -213,7 +213,7 @@ static int convert_exec_to_group(const char *exec, char **result)
 		goto out;
 	}
 
-	for (ptr2 = ptr1; ptr2 != '\0'; ptr2++) {
+	for (ptr2 = ptr1; *ptr2 != '\0'; ptr2++) {
 		if (!isalnum(*ptr2) && *ptr2 != '_') {
 			*ptr2 = '\0';
 			break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ