Skip to content
Commit 0b065273 authored by Michael Walle's avatar Michael Walle Committed by Tom Rini
Browse files

net: ti: am65-cpsw: Fix buffer overflow



The device name is a concatenation of the device node name of the cpsw
device and of the device node name of the port. In my case that is

  ethernet@8000000
  port@1

First the buffer is really too small, but more importantly, there is no
boundary check. Use snprintf() and increase the buffer size.

Fixes: 38922b1f ("net: ti: am65-cpsw: Add support for multi port independent MAC mode")
Signed-off-by: default avatarMichael Walle <mwalle@kernel.org>
parent 3206b77c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment