This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 1.3.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.3.x by this push:
     new a6235ac32 Ensure buf size
a6235ac32 is described below

commit a6235ac32c5c59e98fe69e0d55fa2ac4e2ebe396
Author: Chenjp <[email protected]>
AuthorDate: Mon Jan 26 11:09:32 2026 +0800

    Ensure buf size
    
    Buf size correction.
---
 native/src/sslconf.c              | 2 +-
 xdocs/miscellaneous/changelog.xml | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/native/src/sslconf.c b/native/src/sslconf.c
index 68d4cdd87..68e15faf6 100644
--- a/native/src/sslconf.c
+++ b/native/src/sslconf.c
@@ -288,7 +288,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;
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 906d20200..2fdd0159c 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -37,6 +37,10 @@
       Refactor the SSL_CONF_CTX clean-up to align it with SSL and SSL_CTX
       clean-up. (markt)
     </scode>
+    <fix>
+      Fix unnecessarily large buffer allocation when filtering out NULL and
+      export ciphers. Pull request <pr>35</pr> provided by chenjp. (markt)
+    </fix>
   </changelog>
 </section>
 <section name="1.3.5" rtext="2026-01-19">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to