strncpy: Replace some instances

Instances of g_strncpy() in xrdp_wm_parse_domain_information() are
replaced with strlcpy()
This commit is contained in:
matt335672
2025-12-18 11:44:59 +00:00
parent dd4b56c987
commit 756d415bbc
+2 -2
View File
@@ -348,12 +348,12 @@ xrdp_wm_parse_domain_information(char *originalDomainInfo, int comboMax,
}
}
/* pos limit the String to only contain the IP */
g_strncpy(resultBuffer, &originalDomainInfo[1], pos);
strlcpy(resultBuffer, &originalDomainInfo[1], pos + 1);
}
else
{
LOG(LOG_LEVEL_DEBUG, "domain does not contain _");
g_strncpy(resultBuffer, &originalDomainInfo[1], resultSize - 1);
strlcpy(resultBuffer, &originalDomainInfo[1], resultSize);
}
}
return ret;