Skip to content

Commit

Permalink
Fix regression in strerror
Browse files Browse the repository at this point in the history
  • Loading branch information
nsslh committed Nov 17, 2023
1 parent 2a3fb3f commit f1f7e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function strerror(ret, bufsize=1000)
ccall((:mbedtls_strerror, libmbedcrypto), Cvoid,
(Cint, Ptr{Cvoid}, Csize_t),
ret, buf, bufsize)
resize!(buf, something(findfirst(0x00, buf), length(buf) + 1) - 1)
resize!(buf, something(findfirst(iszero, buf), length(buf) + 1) - 1)
s = String(buf)
if ret == MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE
s *= " (You may need to enable `ssl_conf_renegotiation!`. See " *
Expand Down

0 comments on commit f1f7e36

Please sign in to comment.