dovecot-1.2: master: Don't crash in login_executable -D checks i...

dovecot at dovecot.org dovecot at dovecot.org
Mon Mar 16 02:06:51 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/5284f45c249a
changeset: 8834:5284f45c249a
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 15 20:06:45 2009 -0400
description:
master: Don't crash in login_executable -D checks if protocols line doesn't have imap.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/master/master-settings.c |    6 ++++--

diffs (18 lines):

diff -r 6b84ced81da8 -r 5284f45c249a src/master/master-settings.c
--- a/src/master/master-settings.c	Sun Mar 15 17:48:03 2009 -0400
+++ b/src/master/master-settings.c	Sun Mar 15 20:06:45 2009 -0400
@@ -945,10 +945,12 @@ static bool login_want_core_dumps(struct
 {
 	const char *p;
 
-	p = strstr(set->server->pop3->login_executable, " -D");
+	p = set->server->pop3 == NULL ? NULL :
+		strstr(set->server->pop3->login_executable, " -D");
 	if (p != NULL && p[3] == '\0')
 		return TRUE;
-	p = strstr(set->server->imap->login_executable, " -D");
+	p = set->server->imap == NULL ? NULL :
+		strstr(set->server->imap->login_executable, " -D");
 	if (p != NULL && p[3] == '\0')
 		return TRUE;
 	return FALSE;


More information about the dovecot-cvs mailing list