diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-05-25 19:29:22 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-25 19:39:13 -0700 |
commit | 9fcc34577ed663db6143053cd0bf0c271bb6a3e2 (patch) | |
tree | 8330b5be94a31f5f03b9f13b158c9eba787cf18d /gas/config/tc-cr16.c | |
parent | dcb5d41befce097d48875e744f57fe3209c61aab (diff) | |
download | binutils-9fcc34577ed663db6143053cd0bf0c271bb6a3e2.zip binutils-9fcc34577ed663db6143053cd0bf0c271bb6a3e2.tar.gz binutils-9fcc34577ed663db6143053cd0bf0c271bb6a3e2.tar.bz2 |
tc-cr16.c: Use memmove to concatenate 2 overlapping strings
PR gas/26041
* config/tc-cr16.c (md_assemble): Use memmove to concatenate
2 overlapping strings.
Diffstat (limited to 'gas/config/tc-cr16.c')
-rw-r--r-- | gas/config/tc-cr16.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c index 9018383..951e9ac 100644 --- a/gas/config/tc-cr16.c +++ b/gas/config/tc-cr16.c @@ -2560,8 +2560,11 @@ md_assemble (char *op) if (streq ("cinv", op)) { /* Validate the cinv options. */ + unsigned int op_len, param_len; check_cinv_options (param); - strcat (op, param); + op_len = strlen (op); + param_len = strlen (param) + 1; + memmove (op + op_len, param, param_len); } /* MAPPING - SHIFT INSN, if imm4/imm16 positive values |