diff options
author | Petr Špaček <petr.spacek@nic.cz> | 2019-12-30 13:47:01 +0100 |
---|---|---|
committer | Petr Špaček <petr.spacek@nic.cz> | 2019-12-30 13:47:08 +0100 |
commit | 5ad909dc20779534a7221010d0220865347aedfc (patch) | |
tree | 376e75a4fb1548cf6b1caf0b1b0ea78775364713 | |
parent | 87188b7af62e4ef63b54677adc4fd5b8c21ae697 (diff) | |
download | luaossl-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.
-rw-r--r-- | src/openssl.c | 2 |
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); |