PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/ldap/tests/ldap_controls.phpt ('Test the use of controls')

Script

1: <?php
2:
include "connect.inc";
3:
4:
$link ldap_connect_and_bind($host$port$user$passwd$protocol_version);
5:
insert_dummy_data($link$base);
6:
7:
/* Test assertion control */
8:
var_dump(
9:     
$result ldap_search($link"o=test,$base""objectClass=*", array('o'), 000LDAP_DEREF_NEVER,
10:         [[
'oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(objectClass=organization)']]]),
11:     
ldap_get_entries($link$result),
12:     
$result ldap_search($link"o=test,$base""objectClass=*", array('o'), 000LDAP_DEREF_NEVER,
13:         [[
'oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(objectClass=organizationalUnit)']]]),
14:     
ldap_modify($link"o=test,$base", ['description' => 'desc'],
15:         [[
'oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(!(description=*))']]]),
16:     
$result ldap_read($link"o=test,$base""objectClass=*", array('description')),
17:     
ldap_get_entries($link$result),
18:     
ldap_modify($link"o=test,$base", ['description' => 'desc2'],
19:         [[
'oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(!(description=*))']]]),
20:     
$result ldap_read($link"o=test,$base""objectClass=*", array('description')),
21:     
ldap_get_entries($link$result),
22:     
ldap_delete($link"o=test,$base", [['oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(description=desc2)']]]),
23:     
ldap_errno($link),
24:     
ldap_error($link),
25:     
ldap_rename($link"o=test,$base""o=test2"""TRUE, [['oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(description=desc2)']]]),
26:     
ldap_compare($link"o=test,$base""o""test"),
27:     
ldap_compare($link"o=test,$base""o""test", [['oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(description=desc2)']]]),
28:     
ldap_compare($link"o=test,$base""o""test", [['oid' => LDAP_CONTROL_ASSERT'iscritical' => TRUE'value' => ['filter' => '(description=desc)']]])
29: );
30:
31:
/* Test valuesreturnfilter control */
32:
var_dump(
33:     
$result ldap_read($link"o=test2,$base""objectClass=*", ["l"]),
34:     
ldap_get_entries($link$result)[0]['l'],
35:     
$result ldap_read($link"o=test2,$base""objectClass=*", ["l"], 000LDAP_DEREF_NEVER,
36:         [[
'oid' => LDAP_CONTROL_VALUESRETURNFILTER'iscritical' => TRUE'value' => ['filter' => '(l=*here)']]]),
37:     
ldap_get_entries($link$result)[0]['l']
38: );
39:
?>
40:
===DONE===
41:

Report

==29183== Invalid read of size 8
==29183==    at 0x4C2D8A8: memmove (vg_replace_strmem.c:1259)
==29183==    by 0x6489543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x62443FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97D666: _php_ldap_control_from_array (ldap.c:552)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Address 0x14f7de30 is 0 bytes inside a block of size 4,060 free'd
==29183==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==29183==    by 0x6487ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6487F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x97C3C8: _php_ldap_control_from_array (ldap.c:381)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Block was alloc'd at
==29183==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==29183==    by 0x648902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x648838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x624B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97C2C3: _php_ldap_control_from_array (ldap.c:373)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183== 
==29183== Invalid read of size 2
==29183==    at 0x4C2D900: memmove (vg_replace_strmem.c:1259)
==29183==    by 0x6489543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x62443FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97D666: _php_ldap_control_from_array (ldap.c:552)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Address 0x14f7de38 is 8 bytes inside a block of size 4,060 free'd
==29183==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==29183==    by 0x6487ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6487F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x97C3C8: _php_ldap_control_from_array (ldap.c:381)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Block was alloc'd at
==29183==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==29183==    by 0x648902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x648838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x624B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97C2C3: _php_ldap_control_from_array (ldap.c:373)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183== 
==29183== Invalid read of size 2
==29183==    at 0x4C2D918: memmove (vg_replace_strmem.c:1259)
==29183==    by 0x6489543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x62443FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97D666: _php_ldap_control_from_array (ldap.c:552)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Address 0x14f7de3c is 12 bytes inside a block of size 4,060 free'd
==29183==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==29183==    by 0x6487ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6487F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x97C3C8: _php_ldap_control_from_array (ldap.c:381)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Block was alloc'd at
==29183==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==29183==    by 0x648902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x648838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x624B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97C2C3: _php_ldap_control_from_array (ldap.c:373)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183== 
==29183== Invalid read of size 1
==29183==    at 0x4C2D938: memmove (vg_replace_strmem.c:1259)
==29183==    by 0x6489543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x62443FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97D666: _php_ldap_control_from_array (ldap.c:552)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Address 0x14f7de3e is 14 bytes inside a block of size 4,060 free'd
==29183==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==29183==    by 0x6487ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6487F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x97C3C8: _php_ldap_control_from_array (ldap.c:381)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183==    by 0x1337CAF: zend_execute (zend_vm_execute.h:64031)
==29183==    by 0x10CD954: zend_execute_scripts (zend.c:1510)
==29183==    by 0xFB7DFA: php_execute_script (main.c:2469)
==29183==  Block was alloc'd at
==29183==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==29183==    by 0x648902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x648838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x6486CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==29183==    by 0x624B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==29183==    by 0x97C2C3: _php_ldap_control_from_array (ldap.c:373)
==29183==    by 0x97DABA: _php_ldap_controls_from_array (ldap.c:618)
==29183==    by 0x981BE2: php_ldap_do_search (ldap.c:1598)
==29183==    by 0x9820FA: zif_ldap_read (ldap.c:1656)
==29183==    by 0x11AFBB5: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:618)
==29183==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==29183== 

 

Generated at Sun, 12 Nov 2017 21:17:35 +0000 (28 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.