From: Kurt Zeilenga Date: Thu, 27 May 1999 23:04:28 +0000 (+0000) Subject: Make a copy of "dn" to avoid modification of string literal. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~502 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0ce6ddb80cb42a135130d8df4562b452cfe1da5b;p=openldap Make a copy of "dn" to avoid modification of string literal. --- diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index d6b5faa306..be528ed364 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -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 );