aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/vax-dis.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f262529..035182c 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,9 @@
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
entire buffer.
diff --git a/opcodes/vax-dis.c b/opcodes/vax-dis.c
index e218d49..ed4610b 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, ",");