]> git.sur5r.net Git - openldap/commitdiff
ITS#1898 ldap_controls_dup malloc() bug fix
authorKurt Zeilenga <kurt@openldap.org>
Fri, 21 Jun 2002 21:18:09 +0000 (21:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 21 Jun 2002 21:18:09 +0000 (21:18 +0000)
CHANGES
libraries/libldap/controls.c

diff --git a/CHANGES b/CHANGES
index 4e763ae93297f54f95cf4f87bb8905bcd7de32e5..dfeab80f4c24bd7712aed212efe233582400f64f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,7 @@ OpenLDAP 2.1.3 Engineering
        Fixed back-ldap/meta mapping bug (ITS#1787)
        Add back-monitor added monitorContext support
        Fixed back-perl ad_cname bug (ITS#1882)
+       Fixed libldap ldap_controls_dup() malloc bug (ITS#1898)
        Remove lint
        Build Environment
                Add monitor backend test
@@ -18,6 +19,8 @@ OpenLDAP 2.1.3 Engineering
                Fix SASL-less build issues
                Fix back-perl build issues (ITS#1827)
                Added -ldb-4 detection (ITS#1888)
+       Documentation
+               Numerous manual page updates
 
 OpenLDAP 2.1.2 Release
        Initial release for "general" use.
index 12f455be9863cc1e9fc97ef205d6a2b14abc3bd5..f3af141e1ea29c73ce025ceb104139fb37d23a78 100644 (file)
@@ -285,7 +285,7 @@ ldap_controls_dup( LDAPControl *const *controls )
                return NULL;
        }
 
-       new = (LDAPControl **) LDAP_MALLOC( i * sizeof(LDAPControl *) );
+       new = (LDAPControl **) LDAP_MALLOC( (i+1) * sizeof(LDAPControl *) );
 
        if( new == NULL ) {
                /* memory allocation failure */