php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5796 ldap_get_values_len fails when a value contains NULL characters
Submitted: 2000-07-26 16:26 UTC Modified: 2000-07-28 02:08 UTC
From: alexel at dr15 dot cnrs dot fr Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.0.1 OS: linux
Private report: No CVE-ID: None
 [2000-07-26 16:26 UTC] alexel at dr15 dot cnrs dot fr
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-28 02:08 UTC] sniper@php.net
Fixed in CVS. Thanks!

--Jani

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 12:03:37 2021 UTC