mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
string: Enable __FORTIFY_LEVEL=3
This change enhances fortified string functions to use __builtin_dynamic_object_size under _FORTIFY_SOURCE=3 whenever the compiler supports it.
This commit is contained in:
@@ -22,13 +22,15 @@
|
||||
__fortify_function void
|
||||
__NTH (bcopy (const void *__src, void *__dest, size_t __len))
|
||||
{
|
||||
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
||||
(void) __builtin___memmove_chk (__dest, __src, __len,
|
||||
__glibc_objsize0 (__dest));
|
||||
}
|
||||
|
||||
__fortify_function void
|
||||
__NTH (bzero (void *__dest, size_t __len))
|
||||
{
|
||||
(void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
|
||||
(void) __builtin___memset_chk (__dest, '\0', __len,
|
||||
__glibc_objsize0 (__dest));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user