Check nt_password_hash() return code
While this is unlikely to fail in practice, better be more consistent in validating nt_password_hash() result. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d627a9395d
commit
607bcf61a4
1 changed files with 6 additions and 3 deletions
|
@ -405,9 +405,12 @@ static void eap_mschapv2_process_response(struct eap_sm *sm,
|
|||
if (sm->user->password_hash) {
|
||||
pw_hash = sm->user->password;
|
||||
} else {
|
||||
nt_password_hash(sm->user->password,
|
||||
sm->user->password_len,
|
||||
pw_hash_buf);
|
||||
if (nt_password_hash(sm->user->password,
|
||||
sm->user->password_len,
|
||||
pw_hash_buf) < 0) {
|
||||
data->state = FAILURE;
|
||||
return;
|
||||
}
|
||||
pw_hash = pw_hash_buf;
|
||||
}
|
||||
generate_authenticator_response_pwhash(
|
||||
|
|
Loading…
Reference in a new issue