mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-18 01:59:31 +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;
|
||||
|
||||
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);
|
||||
l_free(tmp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user