summaryrefslogtreecommitdiffstats
path: root/crypto/err/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/err/err.c')
-rw-r--r--crypto/err/err.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 1035e4c749..9b679d9b48 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -220,12 +220,8 @@ static void build_SYS_str_reasons(void)
str->error = (unsigned long)i;
if (str->string == NULL) {
char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]);
- char *src = strerror(i);
- if (src != NULL) {
- strncpy(*dest, src, sizeof(*dest));
- (*dest)[sizeof(*dest) - 1] = '\0';
+ if (openssl_strerror_r(i, *dest, sizeof(*dest)))
str->string = *dest;
- }
}
if (str->string == NULL)
str->string = "unknown";