]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth-client: auth-master - Fix potential segfault in auth_master_wait()
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 28 Aug 2025 11:19:17 +0000 (13:19 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 28 Aug 2025 11:20:06 +0000 (13:20 +0200)
Found by Coverity (#41970).

src/lib-auth-client/auth-master.c

index 56bedef9f91f7cb912fdf9fd2184788c37abf5b5..39a571e60c69e44e0e827e5ae9e1bac5504cf8f1 100644 (file)
@@ -632,8 +632,8 @@ void auth_master_wait(struct auth_master_connection *conn)
        if (conn->conn.input != NULL &&
            i_stream_get_data_size(conn->conn.input) > 0)
                i_stream_set_input_pending(conn->conn.input, TRUE);
-       o_stream_set_flush_pending(conn->conn.output, TRUE);
        if (conn->conn.output != NULL) {
+               o_stream_set_flush_pending(conn->conn.output, TRUE);
                was_corked = o_stream_is_corked(conn->conn.output);
                o_stream_uncork(conn->conn.output);
        }