[Fedora-directory-commits] mod_nss nss_engine_pphrase.c,1.9,1.10

Robert Crittenden (rcritten) fedora-directory-commits at redhat.com
Thu Feb 22 16:50:16 UTC 2007


Author: rcritten

Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16875

Modified Files:
	nss_engine_pphrase.c 
Log Message:
229660

Log a warning on a malformed password file entry instead of dropping core.



Index: nss_engine_pphrase.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- nss_engine_pphrase.c	10 Jan 2007 20:56:00 -0000	1.9
+++ nss_engine_pphrase.c	22 Feb 2007 16:50:14 -0000	1.10
@@ -240,6 +240,11 @@
                         tmp--;
                     line[tmp+1] = '\0';
                     ptr = PL_strchr(line, ':');
+                    if (ptr == NULL) {
+                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
+                           "Malformed password entry for token %s. Format should be token:password", token_name);
+                        continue;
+                    }
                     for(tmp=1; ptr[tmp] == ' '; tmp++) {}
                     pwdstr = strdup(&(ptr[tmp]));
                 }




More information about the Fedora-directory-commits mailing list