浏览代码

Bug 630091 - (cov#15513) Fix usage of uninitialized bervals

We use some uninitialized bervals when the backend code calls
slapi_ldif_parse_line(). We should be initializing the bervals to
be empty.
Nathan Kinder 15 年之前
父节点
当前提交
b99854b931
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      ldap/servers/slapd/back-ldbm/misc.c

+ 2 - 1
ldap/servers/slapd/back-ldbm/misc.c

@@ -529,7 +529,8 @@ get_values_from_string(const char *string, char *type, char ***valuearray)
     char *copy = NULL;
     char *tmpptr = NULL;
     char *startptr = NULL;
-    struct berval tmptype, bvvalue;
+    struct berval tmptype = {0, NULL};
+    struct berval bvvalue = {0, NULL};
     int freeval = 0;
     char *value = NULL;
     int idx = 0;