1 Star 0 Fork 59

qingxiyingyue/binutils

forked from src-openEuler/binutils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Fix-a-potential-use-of-an-uninitialised-value-in-the.patch 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
From 151f5de4a6548cd83a79b4705f1e901776ddacc5 Mon Sep 17 00:00:00 2001
From: Nick Clifton <[email protected]>
Date: Thu, 28 May 2020 11:04:27 +0100
Subject: [PATCH] Fix a potential use of an uninitialised value in the ns32k
disassembler.
* ns32k-dis.c (print_insn_ns32k): Change the arg_bufs array to
static.
---
opcodes/ns32k-dis.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c
index 12df182..ccad820 100644
--- a/opcodes/ns32k-dis.c
+++ b/opcodes/ns32k-dis.c
@@ -738,7 +738,10 @@ print_insn_ns32k (bfd_vma memaddr, disassemble_info *info)
unsigned short first_word;
int ioffset; /* Bits into instruction. */
int aoffset; /* Bits into arguments. */
- char arg_bufs[MAX_ARGS+1][ARG_LEN];
+ /* The arg_bufs array is made static in order to avoid a potential
+ use of an uninitialised value if we are asekd to disassemble a
+ corrupt instruction. */
+ static char arg_bufs[MAX_ARGS+1][ARG_LEN];
int argnum;
int maxarg;
struct private priv;
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qingxiyingyue/binutils.git
[email protected]:qingxiyingyue/binutils.git
qingxiyingyue
binutils
binutils
master

搜索帮助