mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-02-05 19:39:50 +08:00
Limit hostname to 32 bit (including terminator) in kernel.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user