diff --git a/src/cm_protocol/cs_ssl.c b/src/cm_protocol/cs_ssl.c index 8f98297c2e7b8b7911a70dcde2dfe89e071ffee5..69dfef0f57819be36ea24877b118b5c37f2d3db8 100644 --- a/src/cm_protocol/cs_ssl.c +++ b/src/cm_protocol/cs_ssl.c @@ -153,6 +153,10 @@ static const char *cs_ssl_last_err_string(char *buf, uint32 size) ERR_GET_REASON(err), (fstr ? fstr : ""), (rstr ? rstr : "")) == -1) { return buf; } + } else { + if (snprintf_s(buf, size, size - 1, "ERR_GET_error failed, error code = %lu", err) == -1) { + return buf; + } } return buf; }