mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#1898: ldap_controls_dup() writes beyond allocated memory
patch suggested by Dave Steck <dsteck@novell.com>
This commit is contained in:
parent
2893a78d0a
commit
cdce8064e5
@ -285,7 +285,7 @@ ldap_controls_dup( LDAPControl *const *controls )
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
new = (LDAPControl **) LDAP_MALLOC( i * sizeof(LDAPControl *) );
|
new = (LDAPControl **) LDAP_MALLOC( (i+1) * sizeof(LDAPControl *) );
|
||||||
|
|
||||||
if( new == NULL ) {
|
if( new == NULL ) {
|
||||||
/* memory allocation failure */
|
/* memory allocation failure */
|
||||||
|
Loading…
Reference in New Issue
Block a user