9 Star 0 Fork 5

src-openEuler/secDetector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Backport-modify-for-secReadFrom-error.patch 770 Bytes
一键复制 编辑 原始数据 按行查看 历史
吃牛的蛙 提交于 2023-12-14 21:54 . backport some bugfix patches
From 2ed3096cab89564b1e7b95318260517b51573709 Mon Sep 17 00:00:00 2001
From: zgzxx <zhangguangzhi3@huawei.com>
Date: Thu, 14 Dec 2023 18:21:30 +0800
Subject: [PATCH 3/4] modify for secReadFrom error
---
lib/secDetector_sdk.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/secDetector_sdk.cpp b/lib/secDetector_sdk.cpp
index a431377..5bc189e 100644
--- a/lib/secDetector_sdk.cpp
+++ b/lib/secDetector_sdk.cpp
@@ -86,8 +86,10 @@ void secReadFrom(void *reader, char *data, int data_len)
string msg("");
PubSubClient *cur_client = nullptr;
- if (!data || data_len <= 1)
- return
+ if (!data || data_len <= 1) {
+ printf("lib secReadFrom data or data_len error\n");
+ return;
+ }
(void)memset(data, 0, data_len);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/secDetector.git
git@gitee.com:src-openeuler/secDetector.git
src-openeuler
secDetector
secDetector
master

搜索帮助