]> git.ipfire.org Git - thirdparty/grub.git/commit
net/arp: Fix uninitialized scalar variable
authorAlec Brown <alec.r.brown@oracle.com>
Mon, 21 Mar 2022 06:28:58 +0000 (02:28 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 4 Apr 2022 18:28:54 +0000 (20:28 +0200)
commit6bb551db112a6d7509d5633be103fe3ee1e09f37
treed96a0965786ccf28ae5a81d7907b3320020fed2c
parentc2e5dc6916cbdd97d1c10f42fed2c4ba15c32736
net/arp: Fix uninitialized scalar variable

In the function grub_net_arp_receive(), grub_net_network_level_address_t
sender_addr and target_addr are being called but aren't being initialized.
In both of these structs, each member is being set to a value except for
grub_dns_option_t option. This results in this member being filled with junk
data from the stack. To prevent this, we can set the option member in both
structs to 0.

Fixes: CID 375030
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/arp.c