[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ieee1275/ofnet.c: Fix uninitialized ipv4 field
From: |
Michael Chang |
Subject: |
[PATCH] ieee1275/ofnet.c: Fix uninitialized ipv4 field |
Date: |
Thu, 19 Jul 2018 17:36:54 +0800 |
User-agent: |
NeoMutt/20170421 (1.8.2) |
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(+)
Index: grub-2.02/grub-core/net/drivers/ieee1275/ofnet.c
===================================================================
--- grub-2.02.orig/grub-core/net/drivers/ieee1275/ofnet.c
+++ grub-2.02/grub-core/net/drivers/ieee1275/ofnet.c
@@ -160,6 +160,9 @@ grub_ieee1275_parse_bootpath (const char
grub_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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] ieee1275/ofnet.c: Fix uninitialized ipv4 field,
Michael Chang <=