]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/monitor.c
fix ITS#5959 fix
[openldap] / servers / slapd / back-ldap / monitor.c
index 6c598ca364ac986b7349af9223fd90d7709869b5..5b26516cc120b93b84a89a0d5fee167285e1030a 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2007 The OpenLDAP Foundation.
+ * Copyright 2003-2009 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.
@@ -469,7 +469,7 @@ ldap_back_monitor_db_open( BackendDB *be )
        ptr = lutil_strncopy( ptr, suffix.bv_val, suffix.bv_len );
        ptr = lutil_strcopy( ptr, "))" );
        ptr[ 0 ] = '\0';
-       assert( filter->bv_len == ptr - filter->bv_val );
+       assert( ptr == &filter->bv_val[ filter->bv_len ] );
 
        if ( suffix.bv_val != be->be_nsuffix[ 0 ].bv_val ) {
                ch_free( suffix.bv_val );