]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9458 must alloc new conn->c_sb after freeing old one
authorHoward Chu <hyc@openldap.org>
Mon, 8 Feb 2021 00:46:58 +0000 (00:46 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 8 Feb 2021 00:46:58 +0000 (00:46 +0000)
servers/slapd/connection.c

index df5f36ce1edea75fe92760a18dd0b9f5b743366b..3c9c0caf42b6df5acfc11538b2372a64095ccd72 100644 (file)
@@ -520,7 +520,12 @@ Connection * connection_init(
                BER_BVZERO( &c->c_peer_name );
 
                ber_sockbuf_free( c->c_sb );
-               c->c_sb = NULL;
+               c->c_sb = ber_sockbuf_alloc( );
+               {
+                       ber_len_t max = sockbuf_max_incoming;
+                       ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+               }
+
                c->c_sd = AC_SOCKET_INVALID;
                ldap_pvt_thread_mutex_unlock( &c->c_mutex );