mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
sandbox: net: Correct name copy in eth_raw_bus_post_bind()
We cannot be sure that the interface name takes up the full length of the space available to it. Use strcpy() instead of memcpy() in this case. This corrects a valgrind warning. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e3491fb11f
commit
e628bba785
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue