From 28a607a6bfed369b9f0c82e8b5ef4b50c158a928 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Wed, 1 Sep 2010 12:35:26 -0600 Subject: pass the string copy to slapi_dn_normalize_original slapi_dn_normalize_original can modify the argument string, so we cannot pass in a const char *rawdn to that function - instead, pass in a copy created by slapi_ch_strdup --- ldap/servers/slapd/entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c index aa83c96f..82fbbb2c 100644 --- a/ldap/servers/slapd/entry.c +++ b/ldap/servers/slapd/entry.c @@ -264,7 +264,7 @@ str2entry_fast( const char *rawdn, char *s, int flags, int read_stateinfo ) if ( NULL == slapi_entry_get_dn_const( e )) { if (flags & SLAPI_STR2ENTRY_USE_OBSOLETE_DNFORMAT) { normdn = - slapi_ch_strdup(slapi_dn_normalize_original(rawdn)); + slapi_dn_normalize_original(slapi_ch_strdup(rawdn)); } else { normdn = slapi_create_dn_string("%s", rawdn); if (NULL == normdn) { @@ -286,7 +286,7 @@ str2entry_fast( const char *rawdn, char *s, int flags, int read_stateinfo ) } else { if (flags & SLAPI_STR2ENTRY_USE_OBSOLETE_DNFORMAT) { normdn = - slapi_ch_strdup(slapi_dn_normalize_original(rawdn)); + slapi_dn_normalize_original(slapi_ch_strdup(rawdn)); } else { normdn = slapi_create_dn_string("%s", rawdn); if (NULL == normdn) { -- cgit