• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisão340f3ac8082771ecc473ab938fc3d7cbf607ddaa (tree)
Hora2020-03-20 11:05:51
AutorAlan Modra <amodra@gmai...>
CommiterAlan Modra

Mensagem de Log

metag uninitialized memory read

* metag-dis.c (print_insn_metag): Don't ignore status from
read_memory_func.

Mudança Sumário

Diff

--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,10 @@
11 2020-03-20 Alan Modra <amodra@gmail.com>
22
3+ * metag-dis.c (print_insn_metag): Don't ignore status from
4+ read_memory_func.
5+
6+2020-03-20 Alan Modra <amodra@gmail.com>
7+
38 * nds32-dis.c (print_insn_nds32): Remove unnecessary casts.
49 Initialize parts of buffer not written when handling a possible
510 2-byte insn at end of section. Don't attempt decoding of such
--- a/opcodes/metag-dis.c
+++ b/opcodes/metag-dis.c
@@ -3364,9 +3364,15 @@ print_insn_metag (bfd_vma pc, disassemble_info *outf)
33643364 bfd_byte buf[4];
33653365 unsigned int insn_word;
33663366 size_t i;
3367- outf->bytes_per_chunk = 4;
3367+ int status;
33683368
3369- (*outf->read_memory_func) (pc & ~0x03, buf, 4, outf);
3369+ outf->bytes_per_chunk = 4;
3370+ status = (*outf->read_memory_func) (pc & ~0x03, buf, 4, outf);
3371+ if (status)
3372+ {
3373+ (*outf->memory_error_func) (status, pc, outf);
3374+ return -1;
3375+ }
33703376 insn_word = bfd_getl32 (buf);
33713377
33723378 for (i = 0; i < sizeof(metag_optab)/sizeof(metag_optab[0]); i++)