]> git.sur5r.net Git - openldap/commitdiff
Make sure we don't overallocate callbacks
authorKurt Zeilenga <kurt@openldap.org>
Fri, 12 May 2000 19:41:18 +0000 (19:41 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 12 May 2000 19:41:18 +0000 (19:41 +0000)
libraries/libldap/sasl.c

index 10bc3f2baced4715a301001d44237d8022a6028e..76a4ef84d3e1a90f59c1647b26d4c328b1002188 100644 (file)
@@ -899,6 +899,8 @@ ldap_negotiated_sasl_bind_s(
        callbacks[n].proc = NULL;
        callbacks[n].context = NULL;
 
+       assert( n * sizeof(sasl_callback_t) < sizeof(callbacks) );
+
        rc = ldap_pvt_sasl_bind(ld, dn, saslMechanism, callbacks,
                serverControls, clientControls);