From c7a5ce934e4fc8150e030326ae979f7a30a091ee Mon Sep 17 00:00:00 2001 From: chen-chao666 <1790599142@qq.com> Date: Tue, 18 Feb 2025 10:30:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DERR=5Fget=5Ferror=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5err=5Fmsg=E4=B8=BA=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cm_protocol/cs_ssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cm_protocol/cs_ssl.c b/src/cm_protocol/cs_ssl.c index 8f98297..69dfef0 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; } -- Gitee