目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1325

100%

CWE-1164 不相关代码 类漏洞列表 1

CWE-1164 不相关代码 类弱点 1 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-1164 指软件中包含对执行无实质影响的无关代码,如死代码或无效初始化。此类漏洞通常不直接导致数据泄露,但攻击者可利用其混淆代码逻辑、隐藏恶意行为或增加逆向工程难度。开发者应通过静态分析工具定期扫描并清理冗余代码,确保代码库精简,从而降低维护复杂度并消除潜在的安全隐患。

MITRE CWE 官方描述
CWE:CWE-1164 Irrelevant Code(无关代码) 英文:该产品包含非执行所必需的代码,即不产生状态变更(state changes),且不产生改变数据或控制流(control flow)的副作用(side effects),因此移除该代码不会对功能或正确性产生影响。 无关代码(Irrelevant code)可能包括死代码(dead code)、未使用的初始化(initialization)、空代码块(empty blocks)、因优化而可完全移除的代码等。
常见影响 (2)
OtherReduce Reliability
OtherReduce Performance
代码示例 (2)
The condition for the second if statement is impossible to satisfy. It requires that the variables be non-null. However, on the only path where s can be assigned a non-null value, there is a return statement.
String s = null; if (b) { s = "Yes"; return; } if (s != null) { Dead(); }
Bad · C++
The following code excerpt assigns to the variable r and then overwrites the value without using it.
r = getName(); r = getNewBuffer(buf);
Bad · C
CVE ID标题CVSS风险等级Published
CVE-2025-40769 Siemens SINEC Traffic Analyzer 安全漏洞 — SINEC Traffic Analyzer 7.4 High2025-08-12

CWE-1164(不相关代码) 是常见的弱点类别,本平台收录该类弱点关联的 1 条 CVE 漏洞。