From: Howard Chu Date: Fri, 9 Nov 2018 21:16:10 +0000 (+0000) Subject: ITS#8932 check rdnNormalize success X-Git-Tag: OPENLDAP_REL_ENG_2_4_47~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84a844cfd294a93b4fa2516a82d4f0e35e2c3d3d;p=thirdparty%2Fopenldap.git ITS#8932 check rdnNormalize success --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 250f14100c..4c7d539354 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -4609,7 +4609,11 @@ config_renumber_one( Operation *op, SlapReply *rs, CfEntryInfo *parent, /* Do the equivalent of ModRDN */ /* Replace DN / NDN */ newrdn.bv_len = ptr1 - newrdn.bv_val; - rdnNormalize( 0, NULL, NULL, &newrdn, &nnewrdn, NULL ); + rc = rdnNormalize( 0, NULL, NULL, &newrdn, &nnewrdn, NULL ); + if ( rc ) { + free( newrdn.bv_val ); + return LDAP_NAMING_VIOLATION; + } rc = config_rename_one( op, rs, e, parent, a, &newrdn, &nnewrdn, use_ldif ); free( nnewrdn.bv_val );