代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/haproxy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 15c3d20e315f1f06c9649ae598de86d61d41085b Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
Date: Fri, 26 May 2023 16:42:47 +0800
Subject: [PATCH] BUG/MINOR: ssl_sock: add check for ha_meth
in __ssl_sock_init, BIO_meth_new may failed and return NULL if
OPENSSL_zalloc failed. in this case, ha_meth will be NULL, and then
crash happens in BIO_meth_set_write. So, we add a check for ha_meth.
Conflict:NA
Reference:https://github.com/haproxy/haproxy/commit/15c3d20e315f1f06c9649ae598de86d61d41085b
---
src/ssl_sock.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index e637b0423a9a..ff0db9d1a1c2 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -7561,13 +7561,15 @@ static void __ssl_sock_init(void)
ERR_load_SSL_strings();
#endif
ha_meth = BIO_meth_new(0x666, "ha methods");
- BIO_meth_set_write(ha_meth, ha_ssl_write);
- BIO_meth_set_read(ha_meth, ha_ssl_read);
- BIO_meth_set_ctrl(ha_meth, ha_ssl_ctrl);
- BIO_meth_set_create(ha_meth, ha_ssl_new);
- BIO_meth_set_destroy(ha_meth, ha_ssl_free);
- BIO_meth_set_puts(ha_meth, ha_ssl_puts);
- BIO_meth_set_gets(ha_meth, ha_ssl_gets);
+ if (ha_meth != NULL) {
+ BIO_meth_set_write(ha_meth, ha_ssl_write);
+ BIO_meth_set_read(ha_meth, ha_ssl_read);
+ BIO_meth_set_ctrl(ha_meth, ha_ssl_ctrl);
+ BIO_meth_set_create(ha_meth, ha_ssl_new);
+ BIO_meth_set_destroy(ha_meth, ha_ssl_free);
+ BIO_meth_set_puts(ha_meth, ha_ssl_puts);
+ BIO_meth_set_gets(ha_meth, ha_ssl_gets);
+ }
HA_SPIN_INIT(&ckch_lock);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。