From: Heinrich Schuchardt Date: Wed, 29 Apr 2026 15:40:00 +0000 (+0200) Subject: efi_loader: initialize variables in efi_dp_from_http() X-Git-Tag: v2026.07-rc2~14^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28980318032ea19031f0a739221e24f1ad87a09c;p=thirdparty%2Fu-boot.git efi_loader: initialize variables in efi_dp_from_http() When using lwIP, efi_dp_from_http() may fail to initialize ip or mask. Initialize the variables before the call. Addresses-Coverity-ID: 645840 - Uninitialized variables (UNINIT) Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass Signed-off-by: Heinrich Schuchardt --- diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index b3fb20b2501..9efb158f5dd 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -955,8 +955,8 @@ struct efi_device_path *efi_dp_from_http(const char *server, struct udevice *dev efi_uintn_t uridp_len; char *pos; char tmp[128]; - struct efi_ipv4_address ip; - struct efi_ipv4_address mask; + struct efi_ipv4_address ip = { .ip_addr = { 0, 0, 0, 0 } }; + struct efi_ipv4_address mask = { .ip_addr = { 0, 0, 0, 0 } }; if ((server && strlen("http://") + strlen(server) + 1 > sizeof(tmp)) || (!server && IS_ENABLED(CONFIG_NET_LWIP)))