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

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

commit 54f066dda606706dff8dac3b9ca3f63287ccf3c4
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Aug 26 13:21:11 2026 +0100

    Fix a potential crash when negotiating ALPN
---
 native/src/sslutils.c             | 2 +-
 xdocs/miscellaneous/changelog.xml | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/native/src/sslutils.c b/native/src/sslutils.c
index edc9fa8b0..857244d01 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -471,7 +471,7 @@ int select_next_proto(SSL *ssl, const unsigned char **out, 
unsigned char *outlen
         }
 
         // increment len and pointers.
-        i += target_proto_len;
+        i += 1 + target_proto_len;
         supported_protos += target_proto_len;
     }
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index a042749e1..a20e6996c 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -47,6 +47,9 @@
     <update>
       Make Windows 10 / 11 the default target version for Windows builds. 
(rjung)
     </update>
+    <fix>
+      Fix a potential crash when negotiating ALPN. (markt)
+    </fix>
   </changelog>
 </section>
 <section name="2.0.15" rtext="2026-06-15">


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

Reply via email to