TMXR: avoid calling strcpy with overlapping arguments
This commit is contained in:
parent
93b68432f2
commit
194b35f6e8
1 changed files with 11 additions and 11 deletions
|
@ -831,7 +831,7 @@ if (mp->buffered)
|
|||
if (mp->logfiletmpl[0]) /* logfile info */
|
||||
sprintf (growstring(&tptr, 7 + strlen (mp->logfiletmpl)), ",Log=%s", mp->logfiletmpl);
|
||||
while ((*tptr == ',') || (*tptr == ' '))
|
||||
strcpy(tptr, tptr+1);
|
||||
memcpy (tptr, tptr+1, strlen(tptr+1)+1);
|
||||
for (i=0; i<mp->lines; ++i) {
|
||||
char *lptr;
|
||||
lp = mp->ldsc + i;
|
||||
|
@ -844,7 +844,7 @@ for (i=0; i<mp->lines; ++i) {
|
|||
}
|
||||
if (mp->lines == 1)
|
||||
while ((*tptr == ',') || (*tptr == ' '))
|
||||
strcpy(tptr, tptr+1);
|
||||
memcpy (tptr, tptr+1, strlen(tptr+1)+1);
|
||||
if (*tptr == '\0') {
|
||||
free (tptr);
|
||||
tptr = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue