Commit 5a2017d4 authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#9412 fix AVA_Sort on invalid RDN

parent 4797346e
...@@ -233,6 +233,7 @@ AVA_Sort( LDAPRDN rdn, int nAVAs ) ...@@ -233,6 +233,7 @@ AVA_Sort( LDAPRDN rdn, int nAVAs )
{ {
LDAPAVA *ava_i; LDAPAVA *ava_i;
int i; int i;
int rc = LDAP_SUCCESS;
assert( rdn != NULL ); assert( rdn != NULL );
...@@ -250,7 +251,7 @@ AVA_Sort( LDAPRDN rdn, int nAVAs ) ...@@ -250,7 +251,7 @@ AVA_Sort( LDAPRDN rdn, int nAVAs )
/* RFC4512 does not allow multiple AVAs /* RFC4512 does not allow multiple AVAs
* with the same attribute type in RDN (ITS#5968) */ * with the same attribute type in RDN (ITS#5968) */
if ( a == 0 ) if ( a == 0 )
return LDAP_INVALID_DN_SYNTAX; rc = LDAP_INVALID_DN_SYNTAX;
if ( a > 0 ) if ( a > 0 )
break; break;
...@@ -259,7 +260,7 @@ AVA_Sort( LDAPRDN rdn, int nAVAs ) ...@@ -259,7 +260,7 @@ AVA_Sort( LDAPRDN rdn, int nAVAs )
} }
rdn[ j+1 ] = ava_i; rdn[ j+1 ] = ava_i;
} }
return LDAP_SUCCESS; return rc;
} }
static int static int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment