Bladeren bron

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

When the server is built against MozLDAP, 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 jaren geleden
bovenliggende
commit
c476f9a913
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      ldap/servers/slapd/back-ldbm/misc.c

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

@@ -454,8 +454,8 @@ get_value_from_string(const char *string, char *type, char **value)
     char *copy = NULL;
     char *tmpptr = NULL;
     char *startptr = NULL;
-    struct berval tmptype;
-    struct berval bvvalue;
+    struct berval tmptype = {0, NULL};
+    struct berval bvvalue = {0, NULL};
     int freeval = 0;
 
     if (NULL == string || NULL == type || NULL == value) {