diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-03-30 18:23:07 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-03-30 18:23:07 +1100 |
commit | 2c71ca1dd1efe458cb7dee3f8a1a566f913182c2 (patch) | |
tree | 4906d911bcd351c9113675939ab9bd89b30753ae /openbsd-compat/strnlen.c | |
parent | 6b5a17bc14e896e3904dc58d889b58934cfacd24 (diff) |
Disable native strndup and strnlen on AIX.
On at least some revisions of AIX, strndup returns unterminated strings
under some conditions, apparently because strnlen returns incorrect
values in those cases. Disable both on AIX and use the replacements
from openbsd-compat. Fixes problem with ECDSA keys there, ok djm.
Diffstat (limited to 'openbsd-compat/strnlen.c')
-rw-r--r-- | openbsd-compat/strnlen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c index 93d515595..8cc6b96b5 100644 --- a/openbsd-compat/strnlen.c +++ b/openbsd-compat/strnlen.c | |||
@@ -19,7 +19,7 @@ | |||
19 | /* OPENBSD ORIGINAL: lib/libc/string/strnlen.c */ | 19 | /* OPENBSD ORIGINAL: lib/libc/string/strnlen.c */ |
20 | 20 | ||
21 | #include "config.h" | 21 | #include "config.h" |
22 | #ifndef HAVE_STRNLEN | 22 | #if !defined(HAVE_STRNLEN) || defined(BROKEN_STRNLEN) |
23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
24 | 24 | ||
25 | #include <string.h> | 25 | #include <string.h> |