Commit 398e7512d8d7ea5aac8ba0a72c07a3810ce39f42
1 parent
448f11f750
Exists in
smarc_8mq_lf_v2020.04
and in
9 other branches
net: Fix Covarity Defect 244093
Don't allow unterminated strings Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
net/mdio-uclass.c
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | pdata->mii_bus->write = mdio_write; |
76 | 76 | pdata->mii_bus->reset = mdio_reset; |
77 | 77 | pdata->mii_bus->priv = dev; |
78 | - strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN); | |
78 | + strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN - 1); | |
79 | 79 | |
80 | 80 | return mdio_register(pdata->mii_bus); |
81 | 81 | } |
-
mentioned in commit bf35c3