Ensure copying of the whole username/password

This commit is contained in:
Bolke de Bruin 2020-08-21 14:29:01 +02:00
parent 4d7b916faf
commit e89f124afe

View File

@ -1546,11 +1546,11 @@ lib_mod_set_param(struct mod *mod, const char *name, const char *value)
{
if (g_strcasecmp(name, "username") == 0)
{
g_strncpy(mod->username, value, 255);
g_strncpy(mod->username, value, INFO_CLIENT_MAX_CB_LEN-1);
}
else if (g_strcasecmp(name, "password") == 0)
{
g_strncpy(mod->password, value, 255);
g_strncpy(mod->password, value, INFO_CLIENT_MAX_CB_LEN-1);
}
else if (g_strcasecmp(name, "ip") == 0)
{