summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-06-30 14:08:55 -0600
committerRich Megginson <rmeggins@redhat.com>2010-07-01 15:50:43 -0600
commitc1a89263495c933673f8b977f6c202f34e65b293 (patch)
treeadc41997bcd1246072ed3555aa6af325edc82547
parentfc16d51c7349b07a405085fd80548a6d0aaf31e8 (diff)
downloadds-c1a89263495c933673f8b977f6c202f34e65b293.tar.gz
ds-c1a89263495c933673f8b977f6c202f34e65b293.tar.xz
ds-c1a89263495c933673f8b977f6c202f34e65b293.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 is allocating an array of struct dynalib *, so the sizeof needs to use (struct dynalib *) not (struct dynalib). Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
-rw-r--r--ldap/servers/slapd/dynalib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/dynalib.c b/ldap/servers/slapd/dynalib.c
index a659a5e5..58481a80 100644
--- a/ldap/servers/slapd/dynalib.c
+++ b/ldap/servers/slapd/dynalib.c
@@ -129,7 +129,7 @@ sym_load_with_flags( char *libpath, char *symbol, char *plugin, int report_error
}
libs = (struct dynalib **) slapi_ch_realloc( (char *) libs, (i + 2) *
- sizeof(struct dynalib) );
+ sizeof(struct dynalib *) );
libs[i] = (struct dynalib *) slapi_ch_malloc( sizeof(struct dynalib) );
libs[i]->dl_name = slapi_ch_strdup( libpath );
libs[i]->dl_handle = handle;