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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3wrn07blu.fsf@gmail.com>
Date:	Thu, 23 Dec 2010 16:27:57 +0100
From:	Franck Bui-Huu <vagabon.xyz@...il.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] perf-probe: no need to initialize the entire temporary buffers in synthesize_perf_probe_point()

From: Franck Bui-Huu <fbuihuu@...il.com>

This patches only put a single null byte at the beginning of each
temporary buffers line[], offs[], file[] instead of filling their full
contents with null bytes.

Signed-off-by: Franck Bui-Huu <fbuihuu@...il.com>
---
 tools/perf/util/probe-event.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index adc2620..e453f13 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1058,9 +1058,11 @@ error:
 static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
 {
 	char *buf, *tmp;
-	char offs[32] = "", line[32] = "", file[32] = "";
+	char offs[32], line[32], file[32];
 	int ret, len;
 
+	offs[0] = line[0] = file[0] = '\0';
+
 	buf = zalloc(MAX_CMDLEN);
 	if (buf == NULL) {
 		ret = -ENOMEM;
-- 
1.7.3.2

--
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