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

==4266== Invalid read of size 8
==4266==    at 0x4C2D8A8: memmove (vg_replace_strmem.c:1259)
==4266==    by 0x6691543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x644C3FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B63A7: _php_ldap_control_from_array (ldap.c:547)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Address 0x14f37670 is 0 bytes inside a block of size 4,060 free'd
==4266==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==4266==    by 0x668FECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668FF34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x9B50BD: _php_ldap_control_from_array (ldap.c:380)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Block was alloc'd at
==4266==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==4266==    by 0x669102B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x669038C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668E691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668ECFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x6453591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B4FB8: _php_ldap_control_from_array (ldap.c:372)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266== 
==4266== Invalid read of size 2
==4266==    at 0x4C2D900: memmove (vg_replace_strmem.c:1259)
==4266==    by 0x6691543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x644C3FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B63A7: _php_ldap_control_from_array (ldap.c:547)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Address 0x14f37678 is 8 bytes inside a block of size 4,060 free'd
==4266==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==4266==    by 0x668FECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668FF34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x9B50BD: _php_ldap_control_from_array (ldap.c:380)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Block was alloc'd at
==4266==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==4266==    by 0x669102B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x669038C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668E691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668ECFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x6453591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B4FB8: _php_ldap_control_from_array (ldap.c:372)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266== 
==4266== Invalid read of size 2
==4266==    at 0x4C2D918: memmove (vg_replace_strmem.c:1259)
==4266==    by 0x6691543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x644C3FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B63A7: _php_ldap_control_from_array (ldap.c:547)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Address 0x14f3767c is 12 bytes inside a block of size 4,060 free'd
==4266==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==4266==    by 0x668FECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668FF34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x9B50BD: _php_ldap_control_from_array (ldap.c:380)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Block was alloc'd at
==4266==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==4266==    by 0x669102B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x669038C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668E691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668ECFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x6453591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B4FB8: _php_ldap_control_from_array (ldap.c:372)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266== 
==4266== Invalid read of size 1
==4266==    at 0x4C2D938: memmove (vg_replace_strmem.c:1259)
==4266==    by 0x6691543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x644C3FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B63A7: _php_ldap_control_from_array (ldap.c:547)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Address 0x14f3767e is 14 bytes inside a block of size 4,060 free'd
==4266==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==4266==    by 0x668FECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668FF34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x9B50BD: _php_ldap_control_from_array (ldap.c:380)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266==    by 0x134F723: zend_execute (zend_vm_execute.h:61323)
==4266==    by 0x1109E59: zend_execute_scripts (zend.c:1530)
==4266==    by 0xFF2AF5: php_execute_script (main.c:2467)
==4266==  Block was alloc'd at
==4266==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==4266==    by 0x669102B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x669038C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668E691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x668ECFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==4266==    by 0x6453591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==4266==    by 0x9B4FB8: _php_ldap_control_from_array (ldap.c:372)
==4266==    by 0x9B67FB: _php_ldap_controls_from_array (ldap.c:613)
==4266==    by 0x9BA923: php_ldap_do_search (ldap.c:1593)
==4266==    by 0x9BAE3B: zif_ldap_read (ldap.c:1651)
==4266==    by 0x11EFC24: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:626)
==4266==    by 0x134F0D0: execute_ex (zend_vm_execute.h:57400)
==4266== 

 

Generated at Fri, 16 Feb 2018 06:57:12 +0000 (5 days ago)

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