From bf2de6f57a8410ec5d86d03ffd922f6c8894bef7 Mon Sep 17 00:00:00 2001 From: Chenjp Date: Mon, 26 Jan 2026 11:09:32 +0800 Subject: [PATCH] Ensure buf size Buf size correction. --- native/src/sslconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/sslconf.c b/native/src/sslconf.c index b5ff3fd55..fb5723f89 100644 --- a/native/src/sslconf.c +++ b/native/src/sslconf.c @@ -286,7 +286,7 @@ TCN_IMPLEMENT_CALL(jint, SSLConf, apply)(TCN_STDARGS, jlong cctx, * no matter what was given in the config. */ len = strlen(J2S(value)) + strlen(SSL_CIPHERS_ALWAYS_DISABLED) + 1; - buf = malloc(len * sizeof(char *)); + buf = malloc(len * sizeof(char)); if (buf == NULL) { tcn_Throw(e, "Could not allocate memory to adjust cipher string"); return SSL_THROW_RETURN;