dovecot-2.2: imap: Crashfix when running standalone.
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 20 03:26:26 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/91438eb4fad8
changeset: 14308:91438eb4fad8
user: Timo Sirainen <tss at iki.fi>
date: Thu Mar 08 10:39:58 2012 +0200
description:
imap: Crashfix when running standalone.
diffstat:
src/imap/main.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r 8c6ff808902c -r 91438eb4fad8 src/imap/main.c
--- a/src/imap/main.c Thu Mar 08 10:21:09 2012 +0200
+++ b/src/imap/main.c Thu Mar 08 10:39:58 2012 +0200
@@ -208,13 +208,13 @@
if (set->verbose_proctitle)
verbose_proctitle = TRUE;
- client = client_create(fd_in, fd_out, login_client->session_id,
+ client = client_create(fd_in, fd_out, input->session_id,
mail_user, user, set);
T_BEGIN {
client_add_input(client, input_buf);
} T_END;
- flags = login_client == NULL ? 0 : login_client->auth_req.flags;
+ flags = login_client->auth_req.flags;
if ((flags & MAIL_AUTH_REQUEST_FLAG_TLS_COMPRESSION) != 0)
client->tls_compression = TRUE;
return 0;
@@ -222,6 +222,7 @@
static void main_stdio_run(const char *username)
{
+ struct master_login_client login_client;
struct mail_storage_service_input input;
const char *value, *error, *input_base64;
buffer_t *input_buf;
@@ -242,7 +243,9 @@
input_buf = input_base64 == NULL ? NULL :
t_base64_decode_str(input_base64);
- if (client_create_from_input(&input, NULL, STDIN_FILENO, STDOUT_FILENO,
+ memset(&login_client, 0, sizeof(login_client));
+ if (client_create_from_input(&input, &login_client,
+ STDIN_FILENO, STDOUT_FILENO,
input_buf, &error) < 0)
i_fatal("%s", error);
}
More information about the dovecot-cvs
mailing list