]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Import patch from mainline to fix memory corruption in MIPS assembler.
authorNick Clifton <nickc@redhat.com>
Fri, 23 Feb 2018 11:10:42 +0000 (11:10 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 23 Feb 2018 11:10:42 +0000 (11:10 +0000)
PR 22014
gas * config/tc-mips.c (mips_lookup_insn): Use memmove to strip the
instruction size suffix.

gas/ChangeLog
gas/config/tc-mips.c

index 232d2469e4cc53a380eb30351a1f0718e8867095..e9dcc019b04c7fa742460660c7ebfd76d87de7f8 100644 (file)
@@ -1,3 +1,13 @@
+2018-02-23  Nick Clifton  <nickc@redhat.com>
+
+       * Import from mainline:
+
+       2018-02-22  A. Wilcox  <awilfox@adelielinux.org>
+
+       PR 22014
+       * config/tc-mips.c (mips_lookup_insn): Use memmove to strip the
+       instruction size suffix.
+
 2018-02-16  Tamar Christina  <tamar.christina@arm.com>
 
        * config/tc-arm.c (cpu_arch_ver): Renumber ARM_ARCH_V8_4A.
index 97c9109c4fb5ecb90946f215097779cd8006def6..691fb335449494c816709a0662e0f11549810995 100644 (file)
@@ -13956,7 +13956,7 @@ mips_lookup_insn (struct hash_control *hash, const char *start,
        suffix = 0;
       if (suffix)
        {
-         memcpy (name + opend - 2, name + opend, length - opend + 1);
+         memmove (name + opend - 2, name + opend, length - opend + 1);
          insn = (struct mips_opcode *) hash_find (hash, name);
          if (insn)
            {