From 61cadf2dd8bf8c1e63a7bcb33a96042f5ab1a9df Mon Sep 17 00:00:00 2001 From: rcritten <> Date: Thu, 22 Feb 2007 16:50:14 +0000 Subject: 229660 Log a warning on a malformed password file entry instead of dropping core. --- nss_engine_pphrase.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nss_engine_pphrase.c') diff --git a/nss_engine_pphrase.c b/nss_engine_pphrase.c index 6badfe8..83005bf 100644 --- a/nss_engine_pphrase.c +++ b/nss_engine_pphrase.c @@ -240,6 +240,11 @@ static char *nss_get_password(FILE *input, FILE *output, 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])); } -- cgit