[dovecot-cvs] dovecot/src/auth mech-ntlm.c,1.17,1.18

cras at dovecot.org cras at dovecot.org
Fri Mar 25 00:38:39 EET 2005


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv11008/src/auth

Modified Files:
	mech-ntlm.c 
Log Message:
Fixes incorrect error message and adds missing hex_to_binary() return value
check. Patch by Andrey Panin.



Index: mech-ntlm.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-ntlm.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mech-ntlm.c	8 Jan 2005 21:37:32 -0000	1.17
+++ mech-ntlm.c	24 Mar 2005 22:38:37 -0000	1.18
@@ -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];



More information about the dovecot-cvs mailing list