Commit 9951e048 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by David S. Miller

net: ethernet: ti: cpmac.c: Cleaning up missing null-terminate after strncpy call

Added a guaranteed null-terminate after call to strncpy.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3fadb06d
......@@ -1130,6 +1130,7 @@ static int cpmac_probe(struct platform_device *pdev)
strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */
phy_id = pdev->id;
}
mdio_bus_id[sizeof(mdio_bus_id) - 1] = '\0';
dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
if (!dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment