Преглед на файлове

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.
Nathan Kinder преди 15 години
родител
ревизия
6f321de49e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      ldap/servers/slapd/back-ldbm/ldbm_index_config.c

+ 1 - 1
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;