ITS#9828 Fix ldap_count_values_len pointer confusion

This commit is contained in:
Ondřej Kuzník 2022-04-21 12:14:06 +01:00
parent 059c7dbcd8
commit 7e7fad5e03

View file

@ -159,7 +159,15 @@ ldap_count_values( char **vals )
int
ldap_count_values_len( struct berval **vals )
{
return( ldap_count_values( (char **) vals ) );
int i;
if ( vals == NULL )
return 0;
for ( i = 0; !BER_BVISNULL( vals[i] ); i++ )
; /* NULL */
return i;
}
void