diff options
Diffstat (limited to 'src/lib/libcrypto/err')
-rw-r--r-- | src/lib/libcrypto/err/err.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index ae9a209ad7..f6f9d2c080 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
@@ -603,8 +603,7 @@ static void build_SYS_str_reasons(void) | |||
603 | char *src = strerror(i); | 603 | char *src = strerror(i); |
604 | if (src != NULL) | 604 | if (src != NULL) |
605 | { | 605 | { |
606 | strncpy(*dest, src, sizeof *dest); | 606 | strlcpy(*dest, src, sizeof *dest); |
607 | (*dest)[sizeof *dest - 1] = '\0'; | ||
608 | str->string = *dest; | 607 | str->string = *dest; |
609 | } | 608 | } |
610 | } | 609 | } |