diff options
Diffstat (limited to '')
| -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 89bf25e..2e2b29c 100644 --- a/include/string.h +++ b/include/string.h | |||
| @@ -287,6 +287,7 @@ _FORTIFY_FN(strncat) char *strncat(char * _FORTIFY_POS0 __d, const char *__s, | |||
| 287 | #if __has_builtin(__builtin___strncat_chk) && FORTIFY_USE_NATIVE_CHK | 287 | #if __has_builtin(__builtin___strncat_chk) && FORTIFY_USE_NATIVE_CHK |
| 288 | return __builtin___strncat_chk(__d, __s, __n, __fh_bos(__d, 0)); | 288 | return __builtin___strncat_chk(__d, __s, __n, __fh_bos(__d, 0)); |
| 289 | #else | 289 | #else |
| 290 | #if 0 // strlen(__s) isn't guaranteed to be valid. | ||
| 290 | __fh_size_t __b = __fh_bos(__d, 0); | 291 | __fh_size_t __b = __fh_bos(__d, 0); |
| 291 | 292 | ||
| 292 | if (__n > __b) { | 293 | if (__n > __b) { |
| @@ -297,6 +298,7 @@ _FORTIFY_FN(strncat) char *strncat(char * _FORTIFY_POS0 __d, const char *__s, | |||
| 297 | if (__sl + __dl + 1 > __b) | 298 | if (__sl + __dl + 1 > __b) |
| 298 | __builtin_trap(); | 299 | __builtin_trap(); |
| 299 | } | 300 | } |
| 301 | #endif | ||
| 300 | return __orig_strncat(__d, __s, __n); | 302 | return __orig_strncat(__d, __s, __n); |
| 301 | #endif | 303 | #endif |
| 302 | } | 304 | } |
