Limit hostname to 32 bit (including terminator) in kernel.

This commit is contained in:
Florian Pose
2024-05-21 15:42:49 +02:00
parent d999311ae8
commit ade722eb52

View File

@@ -1495,7 +1495,7 @@ int ecrt_slave_config_eoe_dns_address(ec_slave_config_t *sc,
int ecrt_slave_config_eoe_hostname(ec_slave_config_t *sc,
const char *name)
{
strncpy(sc->eoe_ip_param_request.name, name, EC_MAX_HOSTNAME_SIZE);
strncpy(sc->eoe_ip_param_request.name, name, EC_MAX_HOSTNAME_SIZE - 1);
sc->eoe_ip_param_request.name_included = 1;
return 0;
}