From: Timo Sirainen Date: Mon, 14 Dec 2009 00:46:04 +0000 (-0500) Subject: imap, pop3: Don't crash if post-login socket path wasn't given. X-Git-Tag: 2.0.beta1~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af15bd5da7fcb8244554dcb56b9ffd61c613349e;p=thirdparty%2Fdovecot%2Fcore.git imap, pop3: Don't crash if post-login socket path wasn't given. --HG-- branch : HEAD --- diff --git a/src/imap/main.c b/src/imap/main.c index ab97dbb7d4..b570ea6d79 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -275,7 +275,7 @@ int main(int argc, char *argv[]) &argc, &argv, NULL); if (master_getopt(master_service) > 0) return FATAL_DEFAULT; - postlogin_socket_path = t_abspath(argv[1]); + postlogin_socket_path = argv[1] == NULL ? NULL : t_abspath(argv[1]); master_service_init_finish(master_service); master_service_set_die_callback(master_service, imap_die); diff --git a/src/pop3/main.c b/src/pop3/main.c index 2440567624..2fcd57555f 100644 --- a/src/pop3/main.c +++ b/src/pop3/main.c @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) &argc, &argv, NULL); if (master_getopt(master_service) > 0) return FATAL_DEFAULT; - postlogin_socket_path = t_abspath(argv[1]); + postlogin_socket_path = argv[1] == NULL ? NULL : t_abspath(argv[1]); master_service_init_finish(master_service); master_service_set_die_callback(master_service, pop3_die);