fsl/mc: Limit the ethernet name to ETH_NAME_LEN
authorPankaj Bansal <[email protected]>
Thu, 2 Aug 2018 11:01:28 +0000 (16:31 +0530)
committerYork Sun <[email protected]>
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 <[email protected]>
Signed-off-by: Pankaj Bansal <[email protected]>
Reviewed-by: York Sun <[email protected]>
drivers/net/fsl-mc/mc.c
drivers/net/ldpaa_eth/ldpaa_eth.c