[PHP-DEV] PHP 4.0 Bug #5796: ldap_get_values_len fails when a value contains NULL characters From: alexel <email protected>
Date: 07/26/00

From: alexel <email protected>
Operating system: linux
PHP version: 4.0.1
PHP Bug Type: LDAP related
Bug description: ldap_get_values_len fails when a value contains NULL characters

In fact it seems that ldap_get_values_len has the same behaviour as ldap_get_values.
In order to fix that i corrected the funtion :
        ldap_get_values_len in file php-4.0.1/ext/ldap/ldap.c

I replaced the line :

add_next_index_string(return_value, ldap_value_len[i]->bv_val, 1);

with
        add_next_index_stringl(return_value,
                                        ldap_value_len[i]->bv_val,
                                        ldap_value_len[i]->bv_len, 1);
Then it seems to be OK

Michel Alexeline

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>