summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2014-01-13 01:44:31 +0000
committermartynas <martynas@openbsd.org>2014-01-13 01:44:31 +0000
commit205d914736fa27abe76f959a074c750f10aca432 (patch)
tree4b93dd6d464e3a083d2691f164dbd4fc3617da62
parentnew signify options. from and ok espie (diff)
downloadwireguard-openbsd-205d914736fa27abe76f959a074c750f10aca432.tar.xz
wireguard-openbsd-205d914736fa27abe76f959a074c750f10aca432.zip
Enable Wbounded by default. Passing bound bigger than the buffer
size almost always has security implications. I think this quote from Theo summarizes the situation best: Which is why it is important to have at least one unforgiving platform in the ecosystem which properly labels shit shit. That's OpenBSD. If anyone can't handle that, they can go to platforms which hide the reality.
-rw-r--r--gnu/gcc/gcc/c.opt2
-rw-r--r--gnu/usr.bin/gcc/gcc/c-common.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gnu/gcc/gcc/c.opt b/gnu/gcc/gcc/c.opt
index 7d1bd41b10e..a0f37189b3a 100644
--- a/gnu/gcc/gcc/c.opt
+++ b/gnu/gcc/gcc/c.opt
@@ -133,7 +133,7 @@ C ObjC Var(warn_bad_function_cast)
Warn about casting functions to incompatible types
Wbounded
-C ObjC C++ Var(warn_bounded)
+C ObjC C++ Var(warn_bounded) Init(1)
Warn about basic buffer size problems
Wc++-compat
diff --git a/gnu/usr.bin/gcc/gcc/c-common.c b/gnu/usr.bin/gcc/gcc/c-common.c
index f850942c9f9..8abe97eb34a 100644
--- a/gnu/usr.bin/gcc/gcc/c-common.c
+++ b/gnu/usr.bin/gcc/gcc/c-common.c
@@ -335,7 +335,7 @@ int warn_format_security;
/* Warn about buffer size mismatches. */
-int warn_bounded;
+int warn_bounded = 1;
/* C/ObjC language option variables. */