Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3229:bb7282d1e2da HEAD
Fixes incorrect error message and adds missing hex_to_binary() return value
check. Patch by Andrey Panin.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 25 Mar 2005 00:38:37 +0200 |
parents | e2d7f1db71e3 |
children | b85a96766a15 |
files | src/auth/mech-ntlm.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/mech-ntlm.c Fri Mar 25 00:37:44 2005 +0200 +++ b/src/auth/mech-ntlm.c Fri Mar 25 00:38:37 2005 +0200 @@ -48,7 +48,7 @@ if (response_length < LM_RESPONSE_SIZE) { auth_request_log_error(&request->auth_request, "ntlm", - "passdb credentials' length is too small"); + "LM response length is too small"); return FALSE; } @@ -108,8 +108,11 @@ hash_buffer = buffer_create_data(auth_request->pool, hash, sizeof(hash)); - hex_to_binary(credentials, hash_buffer); - + if (hex_to_binary(credentials, hash_buffer) < 0) { + auth_request_log_error(&request->auth_request, "ntlm", + "passdb credentials are not in hex"); + return 0; + } if (response_length > NTLMSSP_RESPONSE_SIZE) { unsigned char ntlm_v2_response[NTLMSSP_V2_RESPONSE_SIZE];