]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ubsan: vax: pointer overflow
authorAlan Modra <amodra@gmail.com>
Sat, 19 Jun 2021 00:55:35 +0000 (10:25 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 19 Jun 2021 01:38:56 +0000 (11:08 +0930)
"VAX export class call relocation test" fails with ubsan on a 32-bit
host.

* vax-dis.c (print_insn_vax): Avoid pointer overflow.

opcodes/ChangeLog
opcodes/vax-dis.c

index f262529d566a06a48c5eb6173ddfb15ec1e4b510..035182c4a477a14148589efa85a28229ef9c6a09 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-19  Alan Modra  <amodra@gmail.com>
+
+       * vax-dis.c (print_insn_vax): Avoid pointer overflow.
+
 2021-06-19  Alan Modra  <amodra@gmail.com>
 
        * tic30-dis.c (get_register_operand): Don't ask strncpy to fill
index e218d4969cacda45b0030f65f85a4503e2995369..ed4610b7afa805ff3894606064fa145fc2e1552f 100644 (file)
@@ -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, ",");