diff --git a/drivers/net/sandbox-raw-bus.c b/drivers/net/sandbox-raw-bus.c index 76d65afe6c..0086f25fc1 100644 --- a/drivers/net/sandbox-raw-bus.c +++ b/drivers/net/sandbox-raw-bus.c @@ -42,7 +42,7 @@ static int eth_raw_bus_post_bind(struct udevice *dev) device_probe(child); priv = dev_get_priv(child); if (priv) { - memcpy(priv->host_ifname, i->if_name, IFNAMSIZ); + strcpy(priv->host_ifname, i->if_name); priv->host_ifindex = i->if_index; priv->local = local; }