mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
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.
This commit is contained in:
parent
72a3b182e1
commit
151f5de4a6
@ -1,3 +1,8 @@
|
||||
2020-05-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* ns32k-dis.c (print_insn_ns32k): Change the arg_bufs array to
|
||||
static.
|
||||
|
||||
2020-05-26 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
Fix extraction of signed constants in nios2 disassembler (again).
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user