| Message ID | 20190730215757.47085-1-joe.hershberger@ni.com |
|---|---|
| State | Accepted |
| Commit | 398e7512d8d7ea5aac8ba0a72c07a3810ce39f42 |
| Delegated to: | Joe Hershberger |
| Headers | show |
| Series | [U-Boot,1/2] net: Fix Covarity Defect 244093 | expand |
Hi Joe, https://patchwork.ozlabs.org/patch/1139394/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git Thanks! -Joe
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index 36a404ff44..1c0d25272a 100644 --- 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); }
Don't allow unterminated strings Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> --- net/mdio-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)