forked from github/server
CID 22570: Copy into fixed size buffer (STRING_OVERFLOW)
not only that, but strlcpy is the faster option here, too.
This commit is contained in:
parent
2f82cccea1
commit
4ee0f76927
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ const char *string, int level, const char *section)
|
|||
for (i = 0; i != mtype->nparameters; ++i) {
|
||||
if (i != 0)
|
||||
*c++ = ' ';
|
||||
c += strlen(strcpy(c, mtype->pnames[i]));
|
||||
c += strlcpy(c, mtype->pnames[i], sizeof(zNames)-(c-zNames));
|
||||
}
|
||||
nrt->vars = _strdup(zNames);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue