]> git.sur5r.net Git - openldap/commitdiff
Fix dnIsSuffix to use berval len
authorHoward Chu <hyc@openldap.org>
Fri, 25 Feb 2011 03:25:20 +0000 (03:25 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 25 Feb 2011 03:25:20 +0000 (03:25 +0000)
servers/slapd/dn.c

index e5e55f7ac8ccca679889dea5d46107cad06de9e4..74bd594e7602634d68bad0ee7440a0307e9e18d6 100644 (file)
@@ -1195,7 +1195,7 @@ dnIsSuffix(
        }
 
        /* compare */
-       return( strcmp( dn->bv_val + d, suffix->bv_val ) == 0 );
+       return( strncmp( dn->bv_val + d, suffix->bv_val, suffix->bv_len ) == 0 );
 }
 
 /*