fix for previous commit: make sure that we do not override the hccapx structure values

pull/1202/head
philsmd 7 years ago
parent 0da8c479e0
commit d60d6f9625
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

@ -2785,6 +2785,8 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED
memcpy (wpa->orig_nonce_ap, in.nonce_ap, 32);
memcpy (wpa->orig_nonce_sta, in.nonce_sta, 32);
u8 message_pair_orig = in.message_pair;
in.message_pair &= 0x7f; // ignore the highest bit (it is used to indicate if the replay counters did match)
if (wpa->message_pair_chgd == true)
@ -2792,9 +2794,9 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED
if (wpa->message_pair != in.message_pair) return (PARSER_HCCAPX_MESSAGE_PAIR);
}
wpa->message_pair = in.message_pair;
wpa->message_pair = message_pair_orig;
if ((wpa->message_pair == MESSAGE_PAIR_M32E3) || (wpa->message_pair == MESSAGE_PAIR_M34E3))
if ((in.message_pair == MESSAGE_PAIR_M32E3) || (in.message_pair == MESSAGE_PAIR_M34E3))
{
wpa->nonce_error_corrections = 0;
}

Loading…
Cancel
Save