Skip to content

Commit 5ad909d

Browse files
committed
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.
1 parent 87188b7 commit 5ad909d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ static const char *aux_strerror_r(int error, char *dst, size_t lim) {
998998
char *rv = strerror_r(error, dst, lim);
999999

10001000
if (rv != NULL)
1001-
return dst;
1001+
return rv;
10021002
#else
10031003
int rv = strerror_r(error, dst, lim);
10041004

0 commit comments

Comments
 (0)