treewide: mem: Enable MEMTEST via defconfig
[oweals/u-boot.git] / drivers / net / sandbox-raw-bus.c
index 76d65afe6c87a8215de48f3468dd6677c84bca68..fb1ba5a8c83a79939673006fdb0334f9e3f76331 100644 (file)
@@ -8,6 +8,7 @@
 #include <asm/eth-raw-os.h>
 #include <dm.h>
 #include <errno.h>
+#include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 
@@ -42,7 +43,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;
                }