]> git.sur5r.net Git - openldap/commitdiff
Fix previous commit, wrong if condition
authorHoward Chu <hyc@openldap.org>
Fri, 3 May 2002 13:07:42 +0000 (13:07 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 3 May 2002 13:07:42 +0000 (13:07 +0000)
libraries/libldap/cyrus.c

index a65771cada403e934dff531a6c12334b397462a5..edb79429cddefa06e02dedb5cab4fc05aadb96f8 100644 (file)
@@ -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,