From: Howard Chu Date: Fri, 3 May 2002 13:07:42 +0000 (+0000) Subject: Fix previous commit, wrong if condition X-Git-Tag: OPENLDAP_REL_ENG_2_MP~107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c1a786d6cb97abf2a550af08f94ba5ac9c6c4db;p=openldap Fix previous commit, wrong if condition --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index a65771cada..edb79429cd 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -312,7 +312,7 @@ sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) ber_pvt_sb_buf_destroy( &p->buf_out ); #endif sasl_getprop( p->sasl_context, SASL_MAXOUTBUF, (const void **)&max ); - if ( len > *max ) + if ( len > *max - 100 ) len = *max - 100; /* For safety margin */ ret = sasl_encode( p->sasl_context, buf, len, (SASL_CONST char **)&p->buf_out.buf_base,