From: Timo Sirainen Date: Mon, 17 Nov 2025 13:32:05 +0000 (+0200) Subject: pop3c: Fix potential hangs with SSL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7036f3f51149c518533511c4120f69f0874b31f3;p=thirdparty%2Fdovecot%2Fcore.git pop3c: Fix potential hangs with SSL io_add_istream() should be used when SSL iostreams. --- diff --git a/src/lib-storage/index/pop3c/pop3c-client.c b/src/lib-storage/index/pop3c/pop3c-client.c index 9f494f2ea0..7608b2deed 100644 --- a/src/lib-storage/index/pop3c/pop3c-client.c +++ b/src/lib-storage/index/pop3c/pop3c-client.c @@ -384,7 +384,8 @@ pop3c_client_get_sasl_plain_request(struct pop3c_client *client) static void pop3c_client_login_finished(struct pop3c_client *client) { io_remove(&client->io); - client->io = io_add(client->fd, IO_READ, pop3c_client_input, client); + client->io = io_add_istream(client->input, + pop3c_client_input, client); timeout_remove(&client->to); client->state = POP3C_CLIENT_STATE_DONE; @@ -596,6 +597,11 @@ static int pop3c_client_ssl_init(struct pop3c_client *client) iostream_rawlog_create(client->set.rawlog_dir, &client->input, &client->output); } + + i_assert(client->io != NULL); + io_remove(&client->io); + client->io = io_add_istream(client->input, + pop3c_client_prelogin_input, client); return 0; }