projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
448f11f
)
net: Fix Covarity Defect 244093
author
Joe Hershberger
<joe.hershberger@ni.com>
Tue, 30 Jul 2019 19:49:56 +0000
(14:49 -0500)
committer
Joe Hershberger
<joe.hershberger@ni.com>
Wed, 4 Sep 2019 16:37:18 +0000
(11:37 -0500)
Don't allow unterminated strings
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
net/mdio-uclass.c
patch
|
blob
|
history
diff --git
a/net/mdio-uclass.c
b/net/mdio-uclass.c
index 36a404ff449a5beddc2611fe167bd32663273efb..1c0d25272a36fd82ed34cb805c81eb9d302651a9 100644
(file)
--- a/
net/mdio-uclass.c
+++ b/
net/mdio-uclass.c
@@
-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);
}