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

==10914== Invalid read of size 8
==10914==    at 0x4C2D8A8: memmove (vg_replace_strmem.c:1259)
==10914==    by 0x6D59543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B143FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x84231C: _php_ldap_control_from_array (ldap.c:544)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Address 0x16013840 is 0 bytes inside a block of size 4,060 free'd
==10914==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10914==    by 0x6D57ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D57F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x8410DA: _php_ldap_control_from_array (ldap.c:377)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Block was alloc'd at
==10914==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10914==    by 0x6D5902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D5838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B1B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x840FDC: _php_ldap_control_from_array (ldap.c:369)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914== 
==10914== Invalid read of size 2
==10914==    at 0x4C2D900: memmove (vg_replace_strmem.c:1259)
==10914==    by 0x6D59543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B143FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x84231C: _php_ldap_control_from_array (ldap.c:544)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Address 0x16013848 is 8 bytes inside a block of size 4,060 free'd
==10914==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10914==    by 0x6D57ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D57F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x8410DA: _php_ldap_control_from_array (ldap.c:377)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Block was alloc'd at
==10914==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10914==    by 0x6D5902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D5838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B1B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x840FDC: _php_ldap_control_from_array (ldap.c:369)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914== 
==10914== Invalid read of size 2
==10914==    at 0x4C2D918: memmove (vg_replace_strmem.c:1259)
==10914==    by 0x6D59543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B143FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x84231C: _php_ldap_control_from_array (ldap.c:544)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Address 0x1601384c is 12 bytes inside a block of size 4,060 free'd
==10914==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10914==    by 0x6D57ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D57F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x8410DA: _php_ldap_control_from_array (ldap.c:377)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Block was alloc'd at
==10914==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10914==    by 0x6D5902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D5838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B1B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x840FDC: _php_ldap_control_from_array (ldap.c:369)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914== 
==10914== Invalid read of size 1
==10914==    at 0x4C2D938: memmove (vg_replace_strmem.c:1259)
==10914==    by 0x6D59543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B143FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x84231C: _php_ldap_control_from_array (ldap.c:544)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Address 0x1601384e is 14 bytes inside a block of size 4,060 free'd
==10914==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10914==    by 0x6D57ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D57F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x8410DA: _php_ldap_control_from_array (ldap.c:377)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914==    by 0xFEBDCB: zend_execute_scripts (zend.c:1608)
==10914==    by 0xED9F70: php_execute_script (main.c:2643)
==10914==    by 0x1236556: do_cli (php_cli.c:997)
==10914==  Block was alloc'd at
==10914==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10914==    by 0x6D5902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D5838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6D56CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==10914==    by 0x6B1B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==10914==    by 0x840FDC: _php_ldap_control_from_array (ldap.c:369)
==10914==    by 0x84271A: _php_ldap_controls_from_array (ldap.c:610)
==10914==    by 0x8467AB: php_ldap_do_search (ldap.c:1589)
==10914==    by 0x846BE3: zif_ldap_read (ldap.c:1647)
==10914==    by 0x1208822: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:700)
==10914==    by 0x1208822: execute_ex (zend_vm_execute.h:54823)
==10914==    by 0x1230790: zend_execute (zend_vm_execute.h:60223)
==10914== 

 

Generated at Tue, 06 Nov 2018 09:43:32 +0000 (11 days ago)

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