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