diff options
| author | q66 | 2023-12-16 00:51:48 +0100 |
|---|---|---|
| committer | q66 | 2023-12-16 00:51:48 +0100 |
| commit | 021e25b5c0a098fc4e2b27a31abb34cb32b76be5 (patch) | |
| tree | 70af70086aae6eeb57e8a261a3688fb30f2cd68b /include/string.h | |
| parent | a018052d410126f94c2602b208b099839d333b05 (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 'include/string.h')
| -rw-r--r-- | include/string.h | 2 |
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) \ |
