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

==6966== Invalid read of size 8
==6966==    at 0x4C2D8A8: memmove (vg_replace_strmem.c:1259)
==6966==    by 0x68AB543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x66663FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B4290: _php_ldap_control_from_array (ldap.c:547)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Address 0x14f66780 is 0 bytes inside a block of size 4,060 free'd
==6966==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==6966==    by 0x68A9ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A9F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x9B306B: _php_ldap_control_from_array (ldap.c:380)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Block was alloc'd at
==6966==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==6966==    by 0x68AB02B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68AA38C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x666D591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B2F6D: _php_ldap_control_from_array (ldap.c:372)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966== 
==6966== Invalid read of size 2
==6966==    at 0x4C2D900: memmove (vg_replace_strmem.c:1259)
==6966==    by 0x68AB543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x66663FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B4290: _php_ldap_control_from_array (ldap.c:547)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Address 0x14f66788 is 8 bytes inside a block of size 4,060 free'd
==6966==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==6966==    by 0x68A9ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A9F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x9B306B: _php_ldap_control_from_array (ldap.c:380)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Block was alloc'd at
==6966==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==6966==    by 0x68AB02B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68AA38C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x666D591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B2F6D: _php_ldap_control_from_array (ldap.c:372)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966== 
==6966== Invalid read of size 2
==6966==    at 0x4C2D918: memmove (vg_replace_strmem.c:1259)
==6966==    by 0x68AB543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x66663FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B4290: _php_ldap_control_from_array (ldap.c:547)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Address 0x14f6678c is 12 bytes inside a block of size 4,060 free'd
==6966==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==6966==    by 0x68A9ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A9F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x9B306B: _php_ldap_control_from_array (ldap.c:380)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Block was alloc'd at
==6966==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==6966==    by 0x68AB02B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68AA38C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x666D591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B2F6D: _php_ldap_control_from_array (ldap.c:372)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966== 
==6966== Invalid read of size 1
==6966==    at 0x4C2D938: memmove (vg_replace_strmem.c:1259)
==6966==    by 0x68AB543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x66663FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B4290: _php_ldap_control_from_array (ldap.c:547)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Address 0x14f6678e is 14 bytes inside a block of size 4,060 free'd
==6966==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==6966==    by 0x68A9ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A9F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x9B306B: _php_ldap_control_from_array (ldap.c:380)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966==    by 0x113B371: zend_execute_scripts (zend.c:1566)
==6966==    by 0x102A06F: php_execute_script (main.c:2467)
==6966==    by 0x1388BF6: do_cli (php_cli.c:1011)
==6966==  Block was alloc'd at
==6966==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==6966==    by 0x68AB02B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68AA38C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x68A8CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==6966==    by 0x666D591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==6966==    by 0x9B2F6D: _php_ldap_control_from_array (ldap.c:372)
==6966==    by 0x9B4693: _php_ldap_controls_from_array (ldap.c:613)
==6966==    by 0x9B8758: php_ldap_do_search (ldap.c:1593)
==6966==    by 0x9B8B90: zif_ldap_read (ldap.c:1651)
==6966==    by 0x135B54E: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:688)
==6966==    by 0x135B54E: execute_ex (zend_vm_execute.h:54817)
==6966==    by 0x1383017: zend_execute (zend_vm_execute.h:60001)
==6966== 

 

Generated at Wed, 23 May 2018 02:31:34 +0000 (3 days ago)

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