handshake: Fix valgrind warning

==27901== Conditional jump or move depends on uninitialised value(s)
==27901==    at 0x41157A: handshake_util_find_pmkid_kde
(handshake.c:537)
==27901==    by 0x40E03A: eapol_handle_ptk_1_of_4 (eapol.c:852)
==27901==    by 0x40F3CD: eapol_key_handle (eapol.c:1417)
==27901==    by 0x40F955: eapol_rx_packet (eapol.c:1607)
==27901==    by 0x410321: __eapol_rx_packet (eapol.c:1915)
This commit is contained in:
Denis Kenzior 2017-05-15 15:23:03 -05:00
parent 305af40636
commit b59977262b
1 changed files with 1 additions and 1 deletions

View File

@ -534,7 +534,7 @@ const uint8_t *handshake_util_find_pmkid_kde(const uint8_t *data,
pmkid = find_kde(data, data_len, &pmkid_len, pmkid_oui);
if (pmkid_len != 16)
if (pmkid && pmkid_len != 16)
return NULL;
return pmkid;