]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp proxy: Crashfix on hanging connections.
authorTimo Sirainen <tss@iki.fi>
Tue, 24 Nov 2009 21:40:50 +0000 (16:40 -0500)
committerTimo Sirainen <tss@iki.fi>
Tue, 24 Nov 2009 21:40:50 +0000 (16:40 -0500)
--HG--
branch : HEAD

src/lmtp/lmtp-proxy.c

index 9148d3a54a8097f1e34c4146776689d30ece48ab..e3a274087c5a5a5692aebf0f6e40a7e1c6daf66f 100644 (file)
@@ -285,6 +285,8 @@ static size_t lmtp_proxy_find_max_data_input_size(struct lmtp_proxy *proxy)
 
        conns = array_get(&proxy->connections, &count);
        for (i = 0; i < count; i++) {
+               if (conns[i]->data_input == NULL)
+                       continue;
                (void)i_stream_get_data(conns[i]->data_input, &size);
                if (max_size < size)
                        max_size = size;
@@ -306,6 +308,8 @@ static bool lmtp_proxy_disconnect_hanging_output(struct lmtp_proxy *proxy)
           more input. */
        conns = array_get(&proxy->connections, &count);
        for (i = 0; i < count; i++) {
+               if (conns[i]->data_input == NULL)
+                       continue;
                (void)i_stream_get_data(conns[i]->data_input, &size);
                if (size == max_size) {
                        lmtp_client_fail(conns[i]->client,