mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Avoid using snprintf() and simply use strcpy().
This commit is contained in:
@@ -66,9 +66,8 @@ crypt_int(const char *fpasswd, const char *username, const char *groupname,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
memset(salt, 0, sizeof(salt));
|
||||
p = salt;
|
||||
p += snprintf(salt, sizeof(salt), "$5$");
|
||||
strcpy(salt, "$5$");
|
||||
p = salt + 3;
|
||||
|
||||
for (i = 0; i < sizeof(_salt); i++) {
|
||||
*p = alphabet[_salt[i] % (sizeof(alphabet) - 1)];
|
||||
|
||||
Reference in New Issue
Block a user