Commit Graph

31 Commits

Author SHA1 Message Date
sin d12254166a Restore C++ support 2015-03-13 23:09:15 +00:00
sin c8ecc164f1 Implement snprintf() and sprintf() using __builtin_va_arg_pack()
Requires at least GCC 4.3.
2015-03-13 17:03:52 +00:00
sin c2b0ad0bf5 Re-order vsnprintf() and vsprintf()
vsprintf() needs to access __vsnprintf_orig().
2015-03-13 14:22:41 +00:00
sin 2b6657b759 Fix typo 2015-03-13 14:19:32 +00:00
sin 9f8c543dc8 Rework fortify implementation to use extern inline
Overriding functions with macros is legal in C but a lot of software
is not prepared for it.  Use the extern inline method to achieve the
same result.
2015-03-13 11:00:46 +00:00
Trutz Behn b211796d68 Put include guards in the reserved namespace
fortify-headers is considered part of the implementation.
2015-03-11 21:33:01 +00:00
sin 14af218559 Ignore C++ for now
It is not legal to override standard functions using macros in C++.
We may have to revisit this in the future.
2015-03-11 11:18:31 +00:00
sin 8604f138c5 Add ifdef guards for C++ code 2015-03-11 09:26:11 +00:00
sin 4514109df1 Fix signed/unsigned warning 2015-03-03 17:11:16 +00:00
sin d87f9d94e1 Remove gcc attribute decoration 2015-03-03 17:10:34 +00:00
sin 1118911981 Don't trap on error for vsprintf() and friends 2015-03-03 17:00:06 +00:00
sin 15c2b9d8df Add fwrite() check 2015-03-01 13:17:21 +00:00
sin 0c985218e9 Add fread() check 2015-03-01 13:12:09 +00:00
sin 488c3c7183 Add vsprintf() check 2015-03-01 12:10:40 +00:00
sin 66b34fbe59 Fix potential signed/unsigned warning 2015-03-01 11:55:38 +00:00
sin 0826c593be Add sprintf() check 2015-03-01 11:09:13 +00:00
sin de499b92ba Minor style fix 2015-02-28 20:21:34 +00:00
sin eecef18261 Remove compile time checks
These can produce false positives.  Given that we support fortify
source level 1 we shouldn't break valid code.
2015-02-24 18:14:33 +00:00
sin c1734bf206 Remove header license comments 2015-02-22 09:39:43 +00:00
sin 6e4f53a3f5 Remember to #undef __errordecl
Thanks zhasha for spotting this.
2015-02-04 18:06:57 +00:00
sin 87f56f70d7 Style fix 2015-02-04 15:13:38 +00:00
sin e4fe187649 Remove __restrict 2015-01-30 16:25:13 +00:00
sin 474f2887ce Add compile-time checks as well 2015-01-29 12:42:41 +00:00
sin 3d15948020 Add license info 2015-01-29 11:13:07 +00:00
sin c18ebb0399 Style fix 2015-01-29 11:10:04 +00:00
sin 2f6dc9f34f Add fgets() checks 2015-01-29 00:12:59 +00:00
sin f54195479d Use BSD-style func defs 2015-01-28 23:40:17 +00:00
sin 31f2952bc7 Use local _n to avoid multiple evaluation 2015-01-28 17:15:56 +00:00
sin 5960e3364f Add snprintf() checks
We need to use a variadic macro in this case because GCC doesn't
allow inline functions with variable argument lists.
2015-01-28 17:08:37 +00:00
sin b4a9df1a08 Use __builtin_va_list 2015-01-28 16:57:38 +00:00
sin e2a76a9502 Add vsnprintf() checks 2015-01-28 16:54:48 +00:00