fsl/mc: Limit the ethernet name to ETH_NAME_LEN
authorPankaj Bansal <pankaj.bansal@nxp.com>
Thu, 2 Aug 2018 11:01:28 +0000 (16:31 +0530)
committerYork Sun <york.sun@nxp.com>
Wed, 8 Aug 2018 15:23:49 +0000 (08:23 -0700)
commitc022ec039d3f32a153a1f7d3b1ffe3dd548d9be4
tree99439be0344d6fc0edda3e015ed09fce6ddce65e
parent6ce83fb3d6ac1cd25772b3c8c1265afbfa42f718
fsl/mc: Limit the ethernet name to ETH_NAME_LEN

The ethernet name should be within the ETH_NAME_LEN, as this
is the buffer space allocated to ethernet name.

Otherwise, this causes buffer overflow.

Reported-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/net/fsl-mc/mc.c
drivers/net/ldpaa_eth/ldpaa_eth.c