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]
Date:	Wed, 20 Feb 2013 16:32:32 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...e.de>
Subject: [PATCH 6/7] perf: Do not allow empty debugfs-dir option

From: Borislav Petkov <bp@...e.de>

Catch empty --debugfs-dir= option and exit early.

Signed-off-by: Borislav Petkov <bp@...e.de>
---
 tools/perf/perf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index f6ba7b73f40e..25f108480ac6 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -199,6 +199,10 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 			(*argv)++;
 			(*argc)--;
 		} else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) {
+			if (strlen(cmd) == strlen(CMD_DEBUGFS_DIR)) {
+				fprintf(stderr, "No directory given for --debugfs-dir.\n");
+				usage(perf_usage_string);
+			}
 			perf_debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR));
 			fprintf(stderr, "dir: %s\n", debugfs_mountpoint);
 			if (envchanged)
-- 
1.8.1.3.535.ga923c31

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