* metag uninitialized memory read
@ 2020-03-20 2:08 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-03-20 2:08 UTC (permalink / raw)
To: binutils
* metag-dis.c (print_insn_metag): Don't ignore status from
read_memory_func.
diff --git a/opcodes/metag-dis.c b/opcodes/metag-dis.c
index f01dcbaef1..b1cf6331b5 100644
--- a/opcodes/metag-dis.c
+++ b/opcodes/metag-dis.c
@@ -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++)
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-20 2:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 2:08 metag uninitialized memory read Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).