[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4690) segfault in ldap_count_values() with PHP



At 06:12 PM 10/1/2006, ando@sys-net.it wrote:
>madcoder@gmail.com wrote:
>...
>You know, what makes me mad about PHP is that it internally uses 
>something comparable to bervals, since the abstract type they use to 
>wrap strings takes care of the length of the string itself; but in the 
>LDAP extension, ldap_get_values() is used everywhere, and then strlen is 
>run to compute the length of the values!  Why on earth don't they get 
>ldap_get_values_len() should be used instead?  Somehow it got hardwired 
>in people's brain that ldap_get_values_len() is only good for "binary" 
>(that is, non-printable) stuff, and not for strings as well!

Folks also tend to forget that U+0000 is a valid Unicode
character, as is ASCII 0...  but I digress.

Kurt