From a18cd0cab43f45b05e9f8bcbf8fed1d67834442d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 25 Mar 2020 08:50:21 +1030 Subject: Uninitialised memory read in z80-dis.c objdump -d -m ez80-adl testcase: .byte 0x40,0xfd * z80-dis.c (suffix): Init mybuf. --- opcodes/z80-dis.c | 1 + 1 file changed, 1 insertion(+) (limited to 'opcodes/z80-dis.c') diff --git a/opcodes/z80-dis.c b/opcodes/z80-dis.c index b23e8e99fd8..cd840444511 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++; -- cgit v1.2.1