about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2020-12-30 11:09:58 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2020-12-31 16:55:21 +0530
commit2a3224c53653214cbba2ec23424702193c80ea3b (patch)
treec34edd8ad17636d2aef26f16dd69ebcff87d1dbe /include
parentc43c5796121bc5bcc0867f02e5536874aa8196c1 (diff)
downloadglibc-2a3224c53653214cbba2ec23424702193c80ea3b.tar.gz
glibc-2a3224c53653214cbba2ec23424702193c80ea3b.tar.xz
glibc-2a3224c53653214cbba2ec23424702193c80ea3b.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/string.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/string.h b/include/string.h
index 7d344d77d4..81dab39891 100644
--- a/include/string.h
+++ b/include/string.h
@@ -123,10 +123,11 @@ libc_hidden_proto (__strerror_l)
 void __explicit_bzero_chk_internal (void *, size_t, size_t)
   __THROW __nonnull ((1)) attribute_hidden;
 # define explicit_bzero(buf, len) \
-  __explicit_bzero_chk_internal (buf, len, __bos0 (buf))
+  __explicit_bzero_chk_internal (buf, len, __glibc_objsize0 (buf))
 #elif !IS_IN (nonlib)
 void __explicit_bzero_chk (void *, size_t, size_t) __THROW __nonnull ((1));
-# define explicit_bzero(buf, len) __explicit_bzero_chk (buf, len, __bos0 (buf))
+# define explicit_bzero(buf, len) __explicit_bzero_chk (buf, len,	      \
+							__glibc_objsize0 (buf))
 #endif
 
 libc_hidden_builtin_proto (memchr)