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-next>] [day] [month] [year] [list]
Message-ID: <20101106084724.GA5956@lenovo>
Date:	Sat, 6 Nov 2010 11:47:24 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>
Subject: [PATCH] perf, ui: Eliminate stack-smashing protection compiler
	complain

 The gcc complains on Yes, No being allocated from stack space. Make
them conts to feel compiler happy.

 |    CC util/ui/util.o
 | cc1: warnings being treated as errors
 | util/ui/util.c: In function ‘ui__dialog_yesno’:
 | util/ui/util.c:108: error: not protecting function: no buffer at least 8 bytes long
 | make: *** [util/ui/util.o] Error 1

Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
CC: Arnaldo Carvalho de Melo <acme@...hat.com>
CC: Frédéric Weisbecker <fweisbec@...il.com>
CC: Ingo Molnar <mingo@...e.hu>
---

Since it seems only me who has such error I presume ssp-buffer-size=8 set
for mine local version of gcc (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4))

 tools/perf/util/ui/util.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.git/tools/perf/util/ui/util.c
=====================================================================
--- linux-2.6.git.orig/tools/perf/util/ui/util.c
+++ linux-2.6.git/tools/perf/util/ui/util.c
@@ -104,9 +104,10 @@ out_destroy_form:
 	return rc;
 }
 
+static const char yes[] = "Yes", no[] = "No";
+
 bool ui__dialog_yesno(const char *msg)
 {
 	/* newtWinChoice should really be accepting const char pointers... */
-	char yes[] = "Yes", no[] = "No";
-	return newtWinChoice(NULL, yes, no, (char *)msg) == 1;
+	return newtWinChoice(NULL, (char *)yes, (char *)no, (char *)msg) == 1;
 }
--
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