ieee1275/ofnet.c: Fix uninitialized ipv4 field
PATCH 1/1 ieee1275/ofnet.c: Fix uninitialized ipv4 field
The ipv4 address field is not initialized to zero that would make the subsequent check to become false positive. The outcome is broken network interface being created with garbage value which may potentially break network connectivity.
This patch fixes the problem by initializing them to zero as needed by subsequent checks.
--- grub-core/net/drivers/ieee1275/ofnet.c | 3 +++ 1 file changed, 3 insertions(+)
grub-core/net/drivers/ieee1275/ofnet.c +3 -0
@@ -160,6 +160,9 @@ grub_ieee1275_parse_bootpath (const chargrub_uint32_t vlantag =0 ; hw_addr.type =GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET ; + client_addr.ipv4 =0 ; + gateway_addr.ipv4 =0 ; + subnet_mask.ipv4 =0 ; args = bootpath +grub_strlen (devpath) +1 ; do