diff options
author | Tom Rini <trini@konsulko.com> | 2021-09-29 07:58:20 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-29 07:58:20 -0400 |
commit | 6eecaf5d0f6b9a500dd5798f1f2bc8296bcfe158 (patch) | |
tree | 1307de30a7d4cc6e5db9a3d78f583d288a5dbbdb /drivers/net/macb.c | |
parent | ba17871884c10f64082ddba2f0632ec44a3ae490 (diff) | |
parent | 4df9f5e39fb224a4857c3411b4cbe419e4d339e8 (diff) |
Merge branch 'network_master' of https://source.denx.de/u-boot/custodians/u-boot-net into next
- Fix some non-NULL terminated strings in the networking subsystem
- net: tsec: Mark tsec_get_interface as __maybe_unused
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 57ea45e2dc7..8151104acfc 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -1245,7 +1245,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr) struct mii_dev *mdiodev = mdio_alloc(); if (!mdiodev) return -ENOMEM; - strncpy(mdiodev->name, netdev->name, MDIO_NAME_LEN); + strlcpy(mdiodev->name, netdev->name, MDIO_NAME_LEN); mdiodev->read = macb_miiphy_read; mdiodev->write = macb_miiphy_write; @@ -1403,7 +1403,7 @@ static int macb_eth_probe(struct udevice *dev) macb->bus = mdio_alloc(); if (!macb->bus) return -ENOMEM; - strncpy(macb->bus->name, dev->name, MDIO_NAME_LEN); + strlcpy(macb->bus->name, dev->name, MDIO_NAME_LEN); macb->bus->read = macb_miiphy_read; macb->bus->write = macb_miiphy_write; |