fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit 74ab2844967648a4e618467237480c6aba37b166
parent 816ad6764b842f354e46da8a5e36558fbaeeb2ad
Author: sin <sin@2f30.org>
Date:   Wed, 25 Feb 2015 10:35:16 +0000

Clarify comment a bit

Diffstat:
Minclude/string.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/string.h b/include/string.h @@ -13,7 +13,8 @@ __fortify_memcpy(void *dest, const void *src, size_t n) char *d = dest; const char *s = src; - /* trap if pointers are overlapping but not if dest == src */ + /* trap if pointers are overlapping but not if dest == src. + * gcc seems to like to generate code that relies on dest == src */ if ((d < s && d + n > s) || (s < d && s + n > d)) __builtin_trap();