]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: ethernet: avoid using unitialized memory 21504/head
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Mon, 12 Jan 2026 11:02:24 +0000 (12:02 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 12 Jan 2026 12:47:39 +0000 (14:47 +0200)
The mac_addr variable was not zero-initialized, causing weird side effects
when the memory contents were a valid MAC address.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Link: https://github.com/openwrt/openwrt/pull/21504
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

index c8d08a8ad9777af9f33f7215796f9bed9151e0ed..c4ea1dfc718ba08165657d2085b89593c4c2546c 100644 (file)
@@ -1655,7 +1655,7 @@ static int rtl838x_eth_probe(struct platform_device *pdev)
        const struct rteth_config *matchdata;
        phy_interface_t phy_mode;
        struct phylink *phylink;
-       u8 mac_addr[ETH_ALEN];
+       u8 mac_addr[ETH_ALEN] = {0};
        int err = 0, rxrings, rxringlen;
        struct ring_b *ring;