[PATCH] board/km/cent2: Fix buffer overflow when fixing MAC address

String "/soc/fman/ethernet@e8000" is 25 bytes long and not 24 due to extra byte for null character at the end.
Signed-off-by: Francois Berder fberder@outlook.fr --- board/keymile/kmcent2/kmcent2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/keymile/kmcent2/kmcent2.c b/board/keymile/kmcent2/kmcent2.c index ed552c57b5..cd3a649c16 100644 --- a/board/keymile/kmcent2/kmcent2.c +++ b/board/keymile/kmcent2/kmcent2.c @@ -291,7 +291,7 @@ int last_stage_init(void) void fdt_fixup_fman_mac_addresses(void *blob) { int node, ret; - char path[24]; + char path[25]; unsigned char mac_addr[6];
/*

On Fri, Sep 29, 2023 at 04:11:00PM +0200, Francois Berder wrote:
String "/soc/fman/ethernet@e8000" is 25 bytes long and not 24 due to extra byte for null character at the end.
Signed-off-by: Francois Berder fberder@outlook.fr
Applied to u-boot/master, thanks!
participants (2)
-
Francois Berder
-
Tom Rini