summaryrefslogtreecommitdiffstats
path: root/ldap
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-06-30 14:18:36 -0600
committerRich Megginson <rmeggins@redhat.com>2010-07-01 15:51:00 -0600
commit138daaa4b171b770e0372c19fb5f656309eea4b1 (patch)
treef37f17ccc0e6b696a96344d107566923ecb8a5a6 /ldap
parentd76bdddeb292b1d71e5d7b1dcdcd985d39025a15 (diff)
downloadds-138daaa4b171b770e0372c19fb5f656309eea4b1.tar.gz
ds-138daaa4b171b770e0372c19fb5f656309eea4b1.tar.xz
ds-138daaa4b171b770e0372c19fb5f656309eea4b1.zip
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The code wants to allocate space for a struct berval, not struct berval *. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
Diffstat (limited to 'ldap')
-rw-r--r--ldap/servers/slapd/tools/ldclt/ldapfct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/tools/ldclt/ldapfct.c b/ldap/servers/slapd/tools/ldclt/ldapfct.c
index b19c6895..4d1ac6a3 100644
--- a/ldap/servers/slapd/tools/ldclt/ldapfct.c
+++ b/ldap/servers/slapd/tools/ldclt/ldapfct.c
@@ -1523,7 +1523,7 @@ buildNewModAttribFile (
{
int nbAttribs; /* Nb of attributes */
LDAPMod attribute; /* To build the attributes */
- struct berval *bv = malloc(sizeof(struct berval *));
+ struct berval *bv = malloc(sizeof(struct berval));
attribute.mod_bvalues = (struct berval **)malloc(2 * sizeof(struct berval *));
if ((bv == NULL) || (attribute.mod_bvalues == NULL)) {