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.
This commit is contained in:
		
							parent
							
								
									5b8ddf6e03
								
							
						
					
					
						commit
						6714d7ecff
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue