]> 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)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 13 Dec 2018 21:15:24 +0000 (21:15 +0000)
servers/slapd/bconfig.c

index 250f14100ca4ea75df830cdf056861978434af08..4c7d539354958e0329af8d6aefaf31f21a23858e 100644 (file)
@@ -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 );