mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-16 04:01:31 +00:00
net: Fix Covarity Defect 244093
Don't allow unterminated strings Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
448f11f750
commit
398e7512d8
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ static int dm_mdio_post_probe(struct udevice *dev)
|
|||
pdata->mii_bus->write = mdio_write;
|
||||
pdata->mii_bus->reset = mdio_reset;
|
||||
pdata->mii_bus->priv = dev;
|
||||
strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN);
|
||||
strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN - 1);
|
||||
|
||||
return mdio_register(pdata->mii_bus);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue