aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar Petr Špaček <petr.spacek@nic.cz> 2019-12-30 13:47:01 +0100
committerLibravatarLibravatar Petr Špaček <petr.spacek@nic.cz> 2019-12-30 13:47:08 +0100
commit5ad909dc20779534a7221010d0220865347aedfc (patch)
tree376e75a4fb1548cf6b1caf0b1b0ea78775364713 /src
parent87188b7af62e4ef63b54677adc4fd5b8c21ae697 (diff)
downloadluaossl-5ad909dc20779534a7221010d0220865347aedfc.tar.gz
luaossl-5ad909dc20779534a7221010d0220865347aedfc.tar.bz2
luaossl-5ad909dc20779534a7221010d0220865347aedfc.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c2
1 files changed, 1 insertions, 1 deletions
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);