aboutsummaryrefslogtreecommitdiff
path: root/opcodes/z80-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-03-25 08:50:21 +1030
committerAlan Modra <amodra@gmail.com>2020-03-25 08:54:18 +1030
commita18cd0cab43f45b05e9f8bcbf8fed1d67834442d (patch)
treeb8464b95e02f76bd28141b06ad4d16dd837c7ca8 /opcodes/z80-dis.c
parent5ab2fbf185935f387fd5c1f8b14ba9fe04b41b39 (diff)
downloadgdb-a18cd0cab43f45b05e9f8bcbf8fed1d67834442d.zip
gdb-a18cd0cab43f45b05e9f8bcbf8fed1d67834442d.tar.gz
gdb-a18cd0cab43f45b05e9f8bcbf8fed1d67834442d.tar.bz2
Uninitialised memory read in z80-dis.c
objdump -d -m ez80-adl testcase: .byte 0x40,0xfd * z80-dis.c (suffix): Init mybuf.
Diffstat (limited to 'opcodes/z80-dis.c')
-rw-r--r--opcodes/z80-dis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/opcodes/z80-dis.c b/opcodes/z80-dis.c
index b23e8e9..cd84044 100644
--- a/opcodes/z80-dis.c
+++ b/opcodes/z80-dis.c
@@ -804,6 +804,7 @@ suffix (struct buffer *buf, disassemble_info *info, const char *txt)
old_stream = info->stream;
info->fprintf_func = (fprintf_ftype) &sprintf;
info->stream = mybuf;
+ mybuf[0] = 0;
buf->base++;
if (print_insn_z80_buf (buf, info) >= 0)
buf->n_used++;