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]
Message-ID: <tip-d56728b8d7fb3e1e5e5f97b88fdf6b43a35b4f5e@git.kernel.org>
Date:	Mon, 7 Dec 2009 17:36:50 GMT
From:	tip-bot for Juha Leppanen <juha_motorsportcom@...kku.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	juha_motorsportcom@...kku.com, dle-develop@...ts.sourceforge.net,
	fweisbec@...il.com, tglx@...utronix.de, mhiramat@...hat.com,
	mingo@...e.hu, systemtap@...rces.redhat.com
Subject: [tip:perf/urgent] perf probe: Fix strtailcmp() to compare s1and s2[0]

Commit-ID:  d56728b8d7fb3e1e5e5f97b88fdf6b43a35b4f5e
Gitweb:     http://git.kernel.org/tip/d56728b8d7fb3e1e5e5f97b88fdf6b43a35b4f5e
Author:     Juha Leppanen <juha_motorsportcom@...kku.com>
AuthorDate: Mon, 7 Dec 2009 12:00:40 -0500
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Mon, 7 Dec 2009 18:33:20 +0100

perf probe: Fix strtailcmp() to compare s1and s2[0]

Fix strtailcmp() to compare s1[0] and s2[0]. strtailcmp() returns 0
if "a" and "b" or "a" and "ab", it's a wrong behavior. This patch
fixes it.

Signed-off-by: "Juha Leppanen" <juha_motorsportcom@...kku.com>
Acked-by: Masami Hiramatsu <mhiramat@...hat.com>
Cc: systemtap <systemtap@...rces.redhat.com>
Cc: DLE <dle-develop@...ts.sourceforge.net>
Cc: Juha Leppanen <juha_motorsportcom@...kku.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <20091207170040.19230.37464.stgit@...p-100-2-132.bos.redhat.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 tools/perf/util/probe-finder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 293cdfc..4585f1d 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -106,7 +106,7 @@ static int strtailcmp(const char *s1, const char *s2)
 {
 	int i1 = strlen(s1);
 	int i2 = strlen(s2);
-	while (--i1 > 0 && --i2 > 0) {
+	while (--i1 >= 0 && --i2 >= 0) {
 		if (s1[i1] != s2[i2])
 			return s1[i1] - s2[i2];
 	}
--
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