From: Howard Chu Date: Mon, 23 Apr 2007 14:21:48 +0000 (+0000) Subject: ITS#4935 SASL_MAX_BUFF_SIZE should be 2^24 - 1 X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~529 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7eb1f62f9d84194eb4251f5b35652e589f4d2105;p=openldap ITS#4935 SASL_MAX_BUFF_SIZE should be 2^24 - 1 --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 5e413c2451..4ff9e8f04a 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -208,7 +208,7 @@ sb_sasl_pkt_length( const unsigned char *buf, int debuglevel ) | buf[2] << 8 | buf[3]; - if ( size > SASL_MAX_BUFF_SIZE ) { + if ( size >= SASL_MAX_BUFF_SIZE ) { /* somebody is trying to mess me up. */ ber_log_printf( LDAP_DEBUG_ANY, debuglevel, "sb_sasl_pkt_length: received illegal packet length " diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index 5f6f6d5d35..4a3ba69776 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -38,7 +38,7 @@ #include #endif -#define SASL_MAX_BUFF_SIZE 65536 +#define SASL_MAX_BUFF_SIZE (0xffffff) #define SASL_MIN_BUFF_SIZE 4096 #endif