20 Star 0 Fork 32

openEuler-RISC-V/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0175-fix-null-pointer-deref-in-stack_broadcast_close.patch 782 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 09c62a8577c340c0254c42bc57c0d193704aa169 Mon Sep 17 00:00:00 2001
From: kircher <majun65@huawei.com>
Date: Fri, 23 Dec 2022 11:50:05 +0800
Subject: [PATCH] fix null pointer deref in stack_broadcast_close
---
src/lstack/core/lstack_protocol_stack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 7b53b91..9cc8946 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -783,7 +783,7 @@ int32_t stack_broadcast_close(int32_t fd)
ret = -1;
}
- if (sock == NULL) {
+ if (sock == NULL || sock->conn == NULL) {
break;
}
fd = sock->conn->socket;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/gazelle.git
git@gitee.com:openeuler-risc-v/gazelle.git
openeuler-risc-v
gazelle
gazelle
master

搜索帮助