mirror of
https://github.com/simh/simh.git
synced 2026-05-02 14:20:05 +00:00
TMXR: avoid calling strcpy with overlapping arguments
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user