From 75dafa2f323555600a1d1675de6eea09d25e3482 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 6 Jan 2017 11:05:27 -0200 Subject: Move fortified explicit_bzero back to string3 Commit 38765ab68f329fd moved the bzero, bcopy, and explicit_bzero fortified macros to a common header (strings_fortified.h). However the side effect is a fortified explicit_bzero is defined when including only strings.h. This patch moves back the fortified explicit_bzero definition to strings3.h header. Checked on x86_64-linux-gnu. * string/bits/strings_fortified.h (explicit_bzero): Move back to .. * string/bits/string3.h: ... here. --- string/bits/string3.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'string/bits/string3.h') diff --git a/string/bits/string3.h b/string/bits/string3.h index 0b0a37744a..738226d49b 100644 --- a/string/bits/string3.h +++ b/string/bits/string3.h @@ -92,6 +92,15 @@ __NTH (memset (void *__dest, int __ch, size_t __len)) #ifdef __USE_MISC # include + +void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) + __THROW __nonnull ((1)); + +__fortify_function void +__NTH (explicit_bzero (void *__dest, size_t __len)) +{ + __explicit_bzero_chk (__dest, __len, __bos0 (__dest)); +} #endif __fortify_function char * -- cgit v1.2.3