ldap/servers/slapd/entry.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 28a607a6bfed369b9f0c82e8b5ef4b50c158a928
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Sep 1 12:35:26 2010 -0600
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
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index aa83c96..82fbbb2 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) {
Show replies by date