fortify-headers

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

commit 1fbf7a3a5e9c02cf992848002cfb88c3c7cc0212
parent 499ea65dd55279319419ff288790e17de629c9a7
Author: sin <sin@2f30.org>
Date:   Wed, 11 Mar 2015 09:21:25 +0000

Add explicit casts to satisfy C++ code

Diffstat:
include/string.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/string.h b/include/string.h @@ -10,8 +10,8 @@ void * __fortify_memcpy(void *dest, const void *src, size_t n) { size_t bos = __builtin_object_size(dest, 0); - char *d = dest; - const char *s = src; + char *d = (char *)dest; + const char *s = (const char *)src; /* trap if pointers are overlapping but not if dest == src. * gcc seems to like to generate code that relies on dest == src */