[PATCH 2/2] gdb/riscv: Fix buffer overflow on riscv_insn::fetch_instruction
Andreas Schwab
schwab@suse.de
Tue Oct 4 09:04:45 GMT 2022
More information about the Binutils mailing list
Tue Oct 4 09:04:45 GMT 2022
- Previous message (by thread): [PATCH 2/2] gdb/riscv: Fix buffer overflow on riscv_insn::fetch_instruction
- Next message (by thread): [PATCH 0/2] RISC-V: Fix buffer overflow after long instruction support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Okt 04 2022, Tsukasa OI via Gdb-patches wrote:
> diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
> index 47d8f9e601b..99307bd2de1 100644
> --- a/gdb/riscv-tdep.c
> +++ b/gdb/riscv-tdep.c
> @@ -1770,7 +1770,7 @@ riscv_insn::fetch_instruction (struct gdbarch *gdbarch,
> CORE_ADDR addr, int *len)
> {
> enum bfd_endian byte_order = gdbarch_byte_order_for_code (gdbarch);
> - gdb_byte buf[8];
> + gdb_byte buf[22];
Can the magic number be derived from something else so that is adapts
automatically?
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
- Previous message (by thread): [PATCH 2/2] gdb/riscv: Fix buffer overflow on riscv_insn::fetch_instruction
- Next message (by thread): [PATCH 0/2] RISC-V: Fix buffer overflow after long instruction support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list