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

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 477fa492 Fix UAF in SSLTest.connect_on_create (#3311)
477fa492 is described below

commit 477fa492d6de82720c7c85abc6835188f9040c2c
Author: Bright Chen <[email protected]>
AuthorDate: Wed May 27 15:52:56 2026 +0800

    Fix UAF in SSLTest.connect_on_create (#3311)
---
 test/brpc_ssl_unittest.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/brpc_ssl_unittest.cpp b/test/brpc_ssl_unittest.cpp
index a7ef1c20..a469a623 100644
--- a/test/brpc_ssl_unittest.cpp
+++ b/test/brpc_ssl_unittest.cpp
@@ -311,6 +311,11 @@ TEST_F(SSLTest, connect_on_create) {
         brpc::Join(correlation_id);
         ASSERT_EQ(EXP_RESPONSE, res.message());
     }
+
+    ptr->SetFailed();
+    ptr.reset();
+    ASSERT_EQ(0, server.Stop(0));
+    ASSERT_EQ(0, server.Join());
 }
 
 void CheckCert(const char* cname, const char* cert) {


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

Reply via email to