summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-09-13 08:24:29 -0700
committerNathan Kinder <nkinder@redhat.com>2010-09-13 08:24:29 -0700
commit6f321de49e76483d6cc1c02c5311404572dce970 (patch)
tree305f7ab53f8e49aa881b84d016c0e824d4f2a0be
parent96cf8e3d42a2c04df7284654fabb31989c58a892 (diff)
downloadds-6f321de49e76483d6cc1c02c5311404572dce970.tar.gz
ds-6f321de49e76483d6cc1c02c5311404572dce970.tar.xz
ds-6f321de49e76483d6cc1c02c5311404572dce970.zip
Bug 630091 - (cov#15515) Use of uninitialized array in index config code
If we encounter an error early in ldbm_instance_index_config_modify_callback(), we jump to the out label where we free each element of the arglist array. This can happen without initializing the array. We need to initialize arglist before there is any chance to jump to the out label.
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_index_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
index cad355f3..aec9260e 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
@@ -396,7 +396,7 @@ ldbm_instance_index_config_modify_callback(Slapi_PBlock *pb, Slapi_Entry *e,
const struct berval *attrValue;
struct attrinfo *ainfo = NULL;
LDAPMod **mods;
- char *arglist[4];
+ char *arglist[4] = {0};
char *config_attr;
char *origIndexTypes, *origMatchingRules;
char **origIndexTypesArray = NULL;