metag uninitialized memory read
* metag-dis.c (print_insn_metag): Don't ignore status from read_memory_func.
This commit is contained in:
parent
fe90ae8a9f
commit
340f3ac808
opcodes
@ -1,3 +1,8 @@
|
||||
2020-03-20 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* metag-dis.c (print_insn_metag): Don't ignore status from
|
||||
read_memory_func.
|
||||
|
||||
2020-03-20 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* nds32-dis.c (print_insn_nds32): Remove unnecessary casts.
|
||||
|
@ -3364,9 +3364,15 @@ print_insn_metag (bfd_vma pc, disassemble_info *outf)
|
||||
bfd_byte buf[4];
|
||||
unsigned int insn_word;
|
||||
size_t i;
|
||||
outf->bytes_per_chunk = 4;
|
||||
int status;
|
||||
|
||||
(*outf->read_memory_func) (pc & ~0x03, buf, 4, outf);
|
||||
outf->bytes_per_chunk = 4;
|
||||
status = (*outf->read_memory_func) (pc & ~0x03, buf, 4, outf);
|
||||
if (status)
|
||||
{
|
||||
(*outf->memory_error_func) (status, pc, outf);
|
||||
return -1;
|
||||
}
|
||||
insn_word = bfd_getl32 (buf);
|
||||
|
||||
for (i = 0; i < sizeof(metag_optab)/sizeof(metag_optab[0]); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user