if (value) {
tmp_len = sizeof (*tmp) + strlen (name);
tmp = g_malloc (tmp_len);
- g_strlcpy (tmp->name, name, tmp_len);
+ g_strlcpy (tmp->name, name, strlen (name) + 1);
tmp->next = NULL;
flag->next = tmp;
}
if (value) {
tmp = g_malloc (sizeof (*tmp) + strlen (name));
- g_strlcpy (tmp->name, name, sizeof (tmp->name));
+ g_strlcpy (tmp->name, name, strlen (name) + 1);
tmp->value = g_strdup (value);
tmp->next = NULL;
tag->next = tmp;
info->uid = lock_real_uid;
}
- g_strlcpy (info->path, path, sizeof (info->path));
+ g_strlcpy (info->path, path, strlen (path) + 1);
info->id = lock_id;
info->depth = 1;
info->next = lock_info_list;