From 5ad909dc20779534a7221010d0220865347aedfc Mon Sep 17 00:00:00 2001 From: Petr Špaček Date: Mon, 30 Dec 2019 13:47:01 +0100 Subject: src/openssl.c: fix GNU version of strerror_r GNU version of strerror_r may return pointer to different place than dst variable, and former version of code was throwing away these results and returned an empty string from dst. --- src/openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openssl.c b/src/openssl.c index 45e3517..9a9de0f 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -998,7 +998,7 @@ static const char *aux_strerror_r(int error, char *dst, size_t lim) { char *rv = strerror_r(error, dst, lim); if (rv != NULL) - return dst; + return rv; #else int rv = strerror_r(error, dst, lim); -- cgit v1.2.3-59-g8ed1b