tc-cr16.c: Use memmove to concatenate 2 overlapping strings
[deliverable/binutils-gdb.git] / gas / config / tc-cr16.c
index 901838398ecd38af97a00230b77a1a976f8c4883..951e9ac7f38ec558f56236fa84ad10f3f69ce3dc 100644 (file)
@@ -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
This page took 0.040508 seconds and 4 git commands to generate.