WPS: Fix segmentation fault in new DH key derivation
Commit 4104267e81
('Fix memory leak on NFC
DH generation error path') modified dh5_init() behavior in the
non-OpenSSL implementation to free the public key (if any was previously
set). However, this did not update one of the callers to make sure the
publ argument in the call is initialized. This could result in trying to
free invalid pointer and segmentation fault when hostapd or
wpa_supplicant was built against some other crypto library than OpenSSL.
Signed-off-by: Rujun Wang <chinawrj@gmail.com>
This commit is contained in:
parent
e4471338c6
commit
46bac6520d
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@
|
|||
|
||||
int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg)
|
||||
{
|
||||
struct wpabuf *pubkey;
|
||||
struct wpabuf *pubkey = NULL;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "WPS: * Public Key");
|
||||
wpabuf_clear_free(wps->dh_privkey);
|
||||
|
|
Loading…
Reference in a new issue