]> git.sur5r.net Git - openldap/commitdiff
Make a copy of "dn" to avoid modification of string literal.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 27 May 1999 23:04:28 +0000 (23:04 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 27 May 1999 23:04:28 +0000 (23:04 +0000)
servers/slapd/back-ldbm/index.c

index d6b5faa306212fb8954dd829d0b6b656e79913af..be528ed36494ceba2799aecf392354b3bc02d3e8 100644 (file)
@@ -38,7 +38,11 @@ index_add_entry(
        bvals[1] = NULL;
 
        /* add the dn to the indexes */
-       index_add_values( be, "dn", bvals, e->e_id );
+       {
+               char *dn = ch_strdup("dn");
+               index_add_values( be, dn, bvals, e->e_id );
+               free( dn );
+       }
 
        free( bv.bv_val );