]> git.sur5r.net Git - openldap/commitdiff
ITS#4935 SASL_MAX_BUFF_SIZE should be 2^24 - 1
authorHoward Chu <hyc@openldap.org>
Mon, 23 Apr 2007 14:21:48 +0000 (14:21 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 23 Apr 2007 14:21:48 +0000 (14:21 +0000)
libraries/libldap/cyrus.c
libraries/libldap/ldap-int.h

index 5e413c2451873f12ecf5d7fa0441752940a3a4ba..4ff9e8f04ac87c91931332e0858d88c7ab061874 100644 (file)
@@ -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 "
index 5f6f6d5d35519494c2e2538d250937ce36edd1b4..4a3ba69776195db0d728a1996f669f449cba9728 100644 (file)
@@ -38,7 +38,7 @@
 #include <sasl.h>
 #endif
 
-#define SASL_MAX_BUFF_SIZE     65536
+#define SASL_MAX_BUFF_SIZE     (0xffffff)
 #define SASL_MIN_BUFF_SIZE     4096
 #endif