diff options
author | Michael Mann <mmann78@netscape.net> | 2013-01-27 15:28:55 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-01-27 15:28:55 +0000 |
commit | b76078d21031be761556a1c04ba9cd66f18ca57f (patch) | |
tree | 43a414976d9dc94c8ad203ba362b1f7a2fc18791 /epan/crypt | |
parent | 10d1f1cd8b618cb0ab0f8a5934444a4a7269d818 (diff) |
Bugfix crash caused by AirPDcap decryption. Bug 8177 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8177)
svn path=/trunk/; revision=47314
Diffstat (limited to 'epan/crypt')
-rw-r--r-- | epan/crypt/airpdcap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c index 0d1e85378f..33c3cad759 100644 --- a/epan/crypt/airpdcap.c +++ b/epan/crypt/airpdcap.c @@ -1204,7 +1204,7 @@ AirPDcapRsna4WHandshake( PAIRPDCAP_KEY_ITEM key, INT offset) { - AIRPDCAP_KEY_ITEM *tmp_key, pkt_key; + AIRPDCAP_KEY_ITEM *tmp_key, *tmp_pkt_key, pkt_key; AIRPDCAP_SEC_ASSOCIATION *tmp_sa; INT key_index; INT ret_value=1; @@ -1313,12 +1313,14 @@ AirPDcapRsna4WHandshake( pkt_key.UserPwd.SsidLen = ctx->pkt_ssid_len; AirPDcapRsnaPwd2Psk(pkt_key.UserPwd.Passphrase, pkt_key.UserPwd.Ssid, pkt_key.UserPwd.SsidLen, pkt_key.KeyData.Wpa.Psk); - tmp_key = &pkt_key; + tmp_pkt_key = &pkt_key; + } else { + tmp_pkt_key = tmp_key; } /* derive the PTK from the BSSID, STA MAC, PMK, SNonce, ANonce */ AirPDcapRsnaPrfX(sa, /* authenticator nonce, bssid, station mac */ - tmp_key->KeyData.Wpa.Pmk, /* PMK */ + tmp_pkt_key->KeyData.Wpa.Pmk, /* PMK */ data+offset+12, /* supplicant nonce */ 512, sa->wpa.ptk); |