From 0ce6ddb80cb42a135130d8df4562b452cfe1da5b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 27 May 1999 23:04:28 +0000 Subject: [PATCH] Make a copy of "dn" to avoid modification of string literal. --- servers/slapd/back-ldbm/index.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ); -- 2.39.5