mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
eap-mschapv2: Check hexstring parses in load_settings
load_settings is assumed to do minimum error checking to avoid crashing on invalid input.
This commit is contained in:
parent
94043d6bcb
commit
970ce050fe
@ -539,7 +539,10 @@ static bool eap_mschapv2_load_settings(struct eap_state *eap,
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
tmp = l_util_from_hexstring(hash_str, &len);
|
tmp = l_util_from_hexstring(hash_str, &len);
|
||||||
memcpy(state->password_hash, tmp, 16);
|
if (!tmp)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
memcpy(state->password_hash, tmp, len);
|
||||||
explicit_bzero(tmp, len);
|
explicit_bzero(tmp, len);
|
||||||
l_free(tmp);
|
l_free(tmp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user