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

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


The following commit(s) were added to refs/heads/main by this push:
     new e61bd13460 Fix bad allocation
e61bd13460 is described below

commit e61bd13460162d932e0cf4bea19c688be78de031
Author: remm <r...@apache.org>
AuthorDate: Tue Aug 8 10:47:40 2023 +0200

    Fix bad allocation
    
    Probably caused by API or behavior changes, caught by the testsuite.
---
 .../java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index aa4fb1d2b8..6f048fd094 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -905,7 +905,7 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
 
     private String getProtocolNegotiated() {
         try (var localArena = Arena.ofConfined()) {
-            MemorySegment lenAddress = 
localArena.allocate(ValueLayout.JAVA_INT, 0);
+            MemorySegment lenAddress = 
localArena.allocate(ValueLayout.JAVA_INT);
             MemorySegment protocolPointer = 
localArena.allocateFrom(ValueLayout.ADDRESS, MemorySegment.NULL);
             SSL_get0_alpn_selected(state.ssl, protocolPointer, lenAddress);
             if (MemorySegment.NULL.equals(protocolPointer)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to