diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-08-10 01:41:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-11 12:27:53 -0700 |
commit | 9951e0484972c9918f8a38ff047cfbad388058d4 (patch) | |
tree | c137d0f49cfa8ac19ebd2d46f05601df3d3fd9b1 /drivers/net/ethernet/ti | |
parent | 3fadb06daef958d2ae2d3be363a0cfaa92008b52 (diff) | |
download | op-kernel-dev-9951e0484972c9918f8a38ff047cfbad388058d4.zip op-kernel-dev-9951e0484972c9918f8a38ff047cfbad388058d4.tar.gz |
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpmac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index 3809f4e..f9bcf7a 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c @@ -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) |