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.
This commit is contained in:
parent
f4a69c9aea
commit
39334a61e6
|
@ -1,3 +1,9 @@
|
||||||
|
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-20 Maciej W. Rozycki <macro@mips.com>
|
2018-02-20 Maciej W. Rozycki <macro@mips.com>
|
||||||
|
|
||||||
* testsuite/gas/mips/mips16-branch-reloc-4.d: New test.
|
* testsuite/gas/mips/mips16-branch-reloc-4.d: New test.
|
||||||
|
|
|
@ -13955,7 +13955,7 @@ mips_lookup_insn (struct hash_control *hash, const char *start,
|
||||||
suffix = 0;
|
suffix = 0;
|
||||||
if (suffix)
|
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);
|
insn = (struct mips_opcode *) hash_find (hash, name);
|
||||||
if (insn)
|
if (insn)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue