]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8932 check rdnNormalize success
authorHoward Chu <hyc@openldap.org>
Fri, 9 Nov 2018 21:16:10 +0000 (21:16 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 9 Nov 2018 21:16:10 +0000 (21:16 +0000)
servers/slapd/bconfig.c

index a638628434fcd7bece7e3bc3bf9e3f3728a6d400..277703d18b2c5acaf390e12deabdeb8cd4a9bfd3 100644 (file)
@@ -4903,7 +4903,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 );