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