summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorq662023-12-16 00:51:48 +0100
committerq662023-12-16 00:51:48 +0100
commit021e25b5c0a098fc4e2b27a31abb34cb32b76be5 (patch)
tree70af70086aae6eeb57e8a261a3688fb30f2cd68b
parenta018052d410126f94c2602b208b099839d333b05 (diff)
Disable str(r)chr hardening
It's UB to subtract null pointers, which these potentially may be. It also makes python test suite fail.
Diffstat (limited to '')
-rw-r--r--include/string.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index eb6cc90..2f2d185 100644
--- a/include/string.h
+++ b/include/string.h
@@ -119,6 +119,7 @@ _FORTIFY_FN(memchr) void *memchr(const void * _FORTIFY_POS0 __d, int __c, size_t
119#endif 119#endif
120} 120}
121 121
122#if 0
122__fh_access(read_only, 1, 2) 123__fh_access(read_only, 1, 2)
123_FORTIFY_FN(strchr) char *strchr(const char * _FORTIFY_POS0 __s, int __c) 124_FORTIFY_FN(strchr) char *strchr(const char * _FORTIFY_POS0 __s, int __c)
124{ 125{
@@ -148,6 +149,7 @@ _FORTIFY_FN(strrchr) char *strrchr(const char * _FORTIFY_POS0 __s, int __c)
148 return __r; 149 return __r;
149#endif 150#endif
150} 151}
152#endif
151 153
152#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ 154#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
153 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ 155 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \