Commit 6714d7ec authored by Andrei Borzenkov's avatar Andrei Borzenkov
Browse files

bootp: check that interface is not NULL in configure_by_dhcp_ack

grub_net_add_addr may fail with OOM and we use returned interface
later without any checks.
parent 5b8ddf6e
......@@ -157,6 +157,9 @@ grub_net_configure_by_dhcp_ack (const char *name,
hwaddr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
inter = grub_net_add_addr (name, card, &addr, &hwaddr, flags);
if (!inter)
return 0;
#if 0
/* This is likely based on misunderstanding. gateway_ip refers to
address of BOOTP relay and should not be used after BOOTP transaction
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment