代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kiran-cc-daemon 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5f64a588c8518aada0c2c8fb73f6ee753eef8f98 Mon Sep 17 00:00:00 2001
From: tangjie02 <tangjie02@kylinsec.com.cn>
Date: Thu, 4 Jul 2024 13:31:05 +0800
Subject: [PATCH 18/22] fix(systeminfo): fix the graphical and network hardware
info no display problem
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复由于placehold1数组大小太小导致读取显卡和网络信息错误问题
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
---
plugins/systeminfo/systeminfo-hardware.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/systeminfo/systeminfo-hardware.cpp b/plugins/systeminfo/systeminfo-hardware.cpp
index 917afe1..73960f7 100644
--- a/plugins/systeminfo/systeminfo-hardware.cpp
+++ b/plugins/systeminfo/systeminfo-hardware.cpp
@@ -26,7 +26,7 @@ namespace Kiran
#define CPUINFO_FILE "/proc/cpuinfo"
#define CPUINFO_KEY_DELIMITER ':'
#define CPUINFO_KEY_MODEL "model name"
-//龙芯cpuinfo中为大写
+// 龙芯cpuinfo中为大写
#define CPUINFO_KEY_MODEL_LS "Model Name"
#define CPUINFO_KEY_PROCESSOR "processor"
@@ -340,9 +340,9 @@ KVList SystemInfoHardware::get_pcis_by_major_class_id(PCIMajorClassID major_clas
auto lines = StrUtils::split_lines(cmd_output);
for (auto& line : lines)
{
- char placehold1[10];
+ char placehold1[50];
unsigned int full_class_id;
- if (sscanf(line.c_str(), "%9s %x:", placehold1, &full_class_id) == 2)
+ if (sscanf(line.c_str(), "%49s %x:", placehold1, &full_class_id) == 2)
{
if ((full_class_id >> 8) == major_class_id)
{
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。