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:
Jouni Malinen 2011-12-04 16:59:16 +02:00
parent d627a9395d
commit 607bcf61a4

View file

@ -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(