From: Alan Modra Date: Sat, 19 Jun 2021 00:55:35 +0000 (+0930) Subject: ubsan: vax: pointer overflow X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47399e9c455b0a634e4c3597c8d9a292cc4b1b0c;p=binutils-gdb.git ubsan: vax: pointer overflow "VAX export class call relocation test" fails with ubsan on a 32-bit host. * vax-dis.c (print_insn_vax): Avoid pointer overflow. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index f262529d566..035182c4a47 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2021-06-19 Alan Modra + + * vax-dis.c (print_insn_vax): Avoid pointer overflow. + 2021-06-19 Alan Modra * tic30-dis.c (get_register_operand): Don't ask strncpy to fill diff --git a/opcodes/vax-dis.c b/opcodes/vax-dis.c index e218d4969ca..ed4610b7afa 100644 --- a/opcodes/vax-dis.c +++ b/opcodes/vax-dis.c @@ -490,7 +490,7 @@ print_insn_vax (bfd_vma memaddr, disassemble_info *info) while (*argp) { - arg += print_insn_arg (argp, arg, memaddr + arg - buffer, info); + arg += print_insn_arg (argp, arg, memaddr + (arg - buffer), info); argp += 2; if (*argp) (*info->fprintf_func) (info->stream, ",");