mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-31 15:32:37 +01:00
eap-wsc: fix valgrind warning
Valgrind does not like uninitialized bytes used in a syscall. In this case the buffer is an out buffer but since valgrind doesn't know that it complains. Initializing to zero fixes the warning: Syscall param socketcall.sendto(msg) points to uninitialised byte(s) at 0x5162C4D: send (send.c:28) by 0x457AF4: l_checksum_update (checksum.c:319) by 0x43C03C: eap_wsc_handle_m2 (eap-wsc.c:842) by 0x43CD33: eap_wsc_handle_request (eap-wsc.c:1048) by 0x43A3A7: __eap_handle_request.part.0 (eap.c:266) by 0x41A426: eapol_rx_packet.part.12 (eapol.c:2262) by 0x41B536: __eapol_rx_packet (eapol.c:2650) by 0x407C80: netdev_control_port_frame_event (netdev.c:3542) by 0x407C80: netdev_unicast_notify (netdev.c:3684) by 0x4598C5: dispatch_unicast_watches (genl.c:899) by 0x4598C5: process_unicast (genl.c:918) by 0x4598C5: received_data (genl.c:1039) by 0x456452: io_callback (io.c:126) by 0x45569D: l_main_iterate (main.c:473) by 0x45576B: l_main_run (main.c:520) Address 0x1ffeffe290 is on thread 1's stack in frame #2, created by eap_wsc_handle_m2 (eap-wsc.c:797)
This commit is contained in:
parent
b3881b84c1
commit
5661e886d8
@ -797,7 +797,7 @@ static void eap_wsc_handle_m2(struct eap_state *eap,
|
||||
{
|
||||
struct eap_wsc_state *wsc = eap_get_data(eap);
|
||||
struct l_key *remote_public;
|
||||
uint8_t shared_secret[192];
|
||||
uint8_t shared_secret[192] = { 0 };
|
||||
size_t shared_secret_len = sizeof(shared_secret);
|
||||
struct l_checksum *sha256;
|
||||
uint8_t dhkey[32];
|
||||
|
Loading…
Reference in New Issue
Block a user