(civetweb) Use strlcpy/strlcat

This commit is contained in:
twinaphex 2016-11-26 17:13:14 +01:00
parent cd0bf8f31a
commit cf76d9e121

View File

@ -5654,8 +5654,8 @@ mg_modify_passwords_file(const char *fname,
}
/* Create a temporary file name. Length has been checked before. */
strcpy(tmp, fname);
strcat(tmp, ".tmp");
strlcpy(tmp, fname, sizeof(tmp));
strlcat(tmp, ".tmp", sizeof(tmp));
/* Create the file if does not exist */
/* Use of fopen here is OK, since fname is only ASCII */