diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-28 17:36:31 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-28 21:11:32 +0930 |
commit | ab382d64260d6549f57201b80d34035726117e3f (patch) | |
tree | 4a6cae74c507f127001d109fd37d2640b1800b1a | |
parent | 6f028f3c0737f82a91a4b5b5bdde1ea889226026 (diff) | |
download | gdb-ab382d64260d6549f57201b80d34035726117e3f.zip gdb-ab382d64260d6549f57201b80d34035726117e3f.tar.gz gdb-ab382d64260d6549f57201b80d34035726117e3f.tar.bz2 |
asan: ns32k: use of uninitialized value
* ns32k-dis.c (print_insn_arg): Handle d value of 'f' for
immediates.
(print_insn_ns32k): Revert last change.
-rw-r--r-- | opcodes/ChangeLog | 6 | ||||
-rw-r--r-- | opcodes/ns32k-dis.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 0189209..986761e 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2020-05-28 Alan Modra <amodra@gmail.com> + + * ns32k-dis.c (print_insn_arg): Handle d value of 'f' for + immediates. + (print_insn_ns32k): Revert last change. + 2020-05-28 Nick Clifton <nickc@redhat.com> * ns32k-dis.c (print_insn_ns32k): Change the arg_bufs array to diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c index ccad820..eac461a 100644 --- a/opcodes/ns32k-dis.c +++ b/opcodes/ns32k-dis.c @@ -524,9 +524,7 @@ print_insn_arg (int d, /* Immediate. */ switch (d) { - case 'I': - case 'Z': - case 'A': + default: /* I and Z are output operands and can`t be immediate A is an address and we can`t have the address of an immediate either. We don't know how much to increase @@ -738,10 +736,7 @@ print_insn_ns32k (bfd_vma memaddr, disassemble_info *info) unsigned short first_word; int ioffset; /* Bits into instruction. */ int aoffset; /* Bits into arguments. */ - /* 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]; + char arg_bufs[MAX_ARGS+1][ARG_LEN]; int argnum; int maxarg; struct private priv; |