mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue