diff options
author | rcritten <> | 2007-02-22 16:50:14 +0000 |
---|---|---|
committer | rcritten <> | 2007-02-22 16:50:14 +0000 |
commit | 61cadf2dd8bf8c1e63a7bcb33a96042f5ab1a9df (patch) | |
tree | 72225d6fc63031e820f8c5f52cb0050665907594 /nss_engine_pphrase.c | |
parent | dd8e415a998b8f0f2701a6d74bf6733352a0b73e (diff) | |
download | mod_nss-61cadf2dd8bf8c1e63a7bcb33a96042f5ab1a9df.tar.gz mod_nss-61cadf2dd8bf8c1e63a7bcb33a96042f5ab1a9df.tar.xz mod_nss-61cadf2dd8bf8c1e63a7bcb33a96042f5ab1a9df.zip |
229660
Log a warning on a malformed password file entry instead of dropping core.
Diffstat (limited to 'nss_engine_pphrase.c')
-rw-r--r-- | nss_engine_pphrase.c | 5 |
1 files changed, 5 insertions, 0 deletions
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])); } |