bug #537: remove memcopy with overlapping strings

Bug reported by Ronan BARZIC
This commit is contained in:
Holger Vogt 2020-12-25 15:38:27 +01:00
parent 86f5a9b819
commit 98eb5bf475
1 changed files with 2 additions and 5 deletions

View File

@ -1424,13 +1424,10 @@ nupa_subcktcall(dico_t *dico, const char *s, const char *x,
const char *i2 = strstr(ds_get_buf(&tstr), "params:");
if (i2) {
const char *optr, *jptr;
pscopy(&tstr, i2 + 7, NULL);
const char* optr, * jptr;
/* search identifier to the left of '=' assignments */
for (optr = ds_get_buf(&tstr);
for (optr = i2 + 7;
(jptr = strchr(optr, '=')) != NULL;
optr = jptr + 1)
{