]> git.sur5r.net Git - openldap/commitdiff
Fix slapi_valueset_count() for no value case
authorLuke Howard <lukeh@openldap.org>
Mon, 27 Feb 2006 05:21:11 +0000 (05:21 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 27 Feb 2006 05:21:11 +0000 (05:21 +0000)
servers/slapd/slapi/slapi_utils.c

index 6b03416dc2fdab9387556646d59161c81403e7e5..39cd1ed19539dc74407948667628ba43fcb64e15 100644 (file)
@@ -2532,6 +2532,9 @@ int slapi_valueset_count( const Slapi_ValueSet *vs )
 
        vp = *vs;
 
+       if ( vp == NULL )
+               return 0;
+
        for ( i = 0; vp[i].bv_val != NULL; i++ )
                ;