aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
diff options
context:
space:
mode:
authorA. Wilcox <awilfox@adelielinux.org>2018-02-22 12:49:49 +0000
committerNick Clifton <nickc@redhat.com>2018-02-22 12:49:49 +0000
commit39334a61e63321352304cbae77b37fcba4fed662 (patch)
tree41cf9cfc3f573c0273ca7c0cfcaa46bc006b6b37 /gas/config/tc-mips.c
parentf4a69c9aea8b2f86abfdc35757c7e8c53e714f64 (diff)
downloadgdb-39334a61e63321352304cbae77b37fcba4fed662.zip
gdb-39334a61e63321352304cbae77b37fcba4fed662.tar.gz
gdb-39334a61e63321352304cbae77b37fcba4fed662.tar.bz2
Fix memory access violation when attempting to shorten a suffixed micromips instruction during lookup.
PR 22014 * config/tc-mips.c (mips_lookup_insn): Use memmove to strip the instruction size suffix.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r--gas/config/tc-mips.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index fca0dea..6c68395 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -13955,7 +13955,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)
{