[dovecot-cvs] dovecot/src/auth password-scheme.c,1.17,1.18

cras at dovecot.org cras at dovecot.org
Fri Jul 22 20:01:50 EEST 2005


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

Modified Files:
	password-scheme.c 
Log Message:
digest_md5_generate(): If username isn't given, give an error message
instead of crashing. Mostly to avoid crashing with dovecotpw utility.



Index: password-scheme.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/password-scheme.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- password-scheme.c	29 Dec 2004 10:56:26 -0000	1.17
+++ password-scheme.c	22 Jul 2005 17:01:47 -0000	1.18
@@ -331,6 +331,9 @@
 	const char *realm, *str;
 	unsigned char digest[16];
 
+	if (user == NULL)
+		i_fatal("digest_md5_generate(): username not given");
+
 	/* user:realm:passwd */
 	realm = strchr(user, '@');
 	if (realm != NULL) realm++; else realm = "";



More information about the dovecot-cvs mailing list