代码拉取完成,页面将自动刷新
From b963f0a75bd6c95fbfa0ac17e46ab1f9d1a787c4 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 14 Nov 2023 04:23:28 -0500
Subject: [PATCH 1/2] unix: ignore ifaddrs with NULL ifa_addr (#4218)
Passing this to uv__is_ipv6_link_local() is causing a segmentation
fault. Note that the documentation for getifaddrs() explicitly states
that this value may be NULL.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
src/unix/tcp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/unix/tcp.c b/src/unix/tcp.c
index a6b53e5913271d0c83e1d7f7e4cb8140f5f3936d..29f4532e747db50146a8b821389f4d45304c5cd0 100644
--- a/src/unix/tcp.c
+++ b/src/unix/tcp.c
@@ -233,8 +233,9 @@ static int uv__ipv6_link_local_scope_id(void) {
return 0;
for (p = ifa; p != NULL; p = p->ifa_next)
- if (uv__is_ipv6_link_local(p->ifa_addr))
- break;
+ if (p->ifa_addr != NULL)
+ if (uv__is_ipv6_link_local(p->ifa_addr))
+ break;
rv = 0;
if (p != NULL) {
--
2.41.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。