mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-26 13:49:35 -05:00
WPS: Fix potential memory leak with NFC password token
The old stored public key hash needs to be freed before replacing the pointer with the new value. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7be6dc2e96
commit
582143e544
@ -384,6 +384,7 @@ static int wps_parse_oob_dev_pwd(struct wps_context *wps,
|
|||||||
|
|
||||||
pos = attr.oob_dev_password;
|
pos = attr.oob_dev_password;
|
||||||
|
|
||||||
|
wpabuf_free(oob_conf->pubkey_hash);
|
||||||
oob_conf->pubkey_hash =
|
oob_conf->pubkey_hash =
|
||||||
wpabuf_alloc_copy(pos, WPS_OOB_PUBKEY_HASH_LEN);
|
wpabuf_alloc_copy(pos, WPS_OOB_PUBKEY_HASH_LEN);
|
||||||
if (oob_conf->pubkey_hash == NULL) {
|
if (oob_conf->pubkey_hash == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user