From: Howard Chu Date: Tue, 24 Feb 2004 16:25:39 +0000 (+0000) Subject: ITS#2944, #2956 - revert maxbuf patch from ITS#2184 X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~415 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6cedc94c6393c4ab916255f76bb93447f213bce7;p=openldap ITS#2944, #2956 - revert maxbuf patch from ITS#2184 Still need to think about interoperability with other versions, vendors... --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 6cc4861ef5..8bdfc40fd0 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -356,14 +356,11 @@ sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) /* now encode the next packet. */ #if SASL_VERSION_MAJOR >= 2 ber_pvt_sb_buf_init( &p->buf_out ); - /* sasl v2 makes sure this number is correct */ - if ( len > *p->sasl_maxbuf ) - len = *p->sasl_maxbuf; #else ber_pvt_sb_buf_destroy( &p->buf_out ); +#endif if ( len > *p->sasl_maxbuf - 100 ) len = *p->sasl_maxbuf - 100; /* For safety margin */ -#endif ret = sasl_encode( p->sasl_context, buf, len, (SASL_CONST char **)&p->buf_out.buf_base, (unsigned *)&p->buf_out.buf_size );