realtek: ethernet: Avoid usage of unsafe strcpy
authorSven Eckelmann <[email protected]>
Sun, 23 Nov 2025 14:10:41 +0000 (15:10 +0100)
committerHauke Mehrtens <[email protected]>
Mon, 24 Nov 2025 23:28:50 +0000 (00:28 +0100)
commit80375e5acdaaf7555cd44ee1c8f247f701c6c5cb
treefca971134716ab3ad92a21a15617cff2f37b2b79
parentbc71e705aa03ccf97d1044e8c0f9e415413ca12c
realtek: ethernet: Avoid usage of unsafe strcpy

strcpy doesn't check the length of the destination buffer. And strlcpy
would not make sure to null-terminate the destination buffer.

Even when it is clear that this string will fit in the currrent buffer, it
is just best practice to avoid strcpy.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c