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

==16148== Invalid read of size 8
==16148==    at 0x4C2D8A8: memmove (vg_replace_strmem.c:1259)
==16148==    by 0x6599543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x63543FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x8066C2: _php_ldap_control_from_array (ldap.c:549)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Address 0x15940930 is 0 bytes inside a block of size 4,060 free'd
==16148==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==16148==    by 0x6597ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6597F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x805480: _php_ldap_control_from_array (ldap.c:382)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Block was alloc'd at
==16148==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==16148==    by 0x659902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x659838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x635B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x805382: _php_ldap_control_from_array (ldap.c:374)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148== 
==16148== Invalid read of size 2
==16148==    at 0x4C2D900: memmove (vg_replace_strmem.c:1259)
==16148==    by 0x6599543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x63543FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x8066C2: _php_ldap_control_from_array (ldap.c:549)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Address 0x15940938 is 8 bytes inside a block of size 4,060 free'd
==16148==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==16148==    by 0x6597ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6597F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x805480: _php_ldap_control_from_array (ldap.c:382)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Block was alloc'd at
==16148==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==16148==    by 0x659902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x659838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x635B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x805382: _php_ldap_control_from_array (ldap.c:374)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148== 
==16148== Invalid read of size 2
==16148==    at 0x4C2D918: memmove (vg_replace_strmem.c:1259)
==16148==    by 0x6599543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x63543FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x8066C2: _php_ldap_control_from_array (ldap.c:549)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Address 0x1594093c is 12 bytes inside a block of size 4,060 free'd
==16148==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==16148==    by 0x6597ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6597F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x805480: _php_ldap_control_from_array (ldap.c:382)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Block was alloc'd at
==16148==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==16148==    by 0x659902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x659838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x635B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x805382: _php_ldap_control_from_array (ldap.c:374)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148== 
==16148== Invalid read of size 1
==16148==    at 0x4C2D938: memmove (vg_replace_strmem.c:1259)
==16148==    by 0x6599543: ber_dupbv_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x63543FB: ldap_control_create (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x8066C2: _php_ldap_control_from_array (ldap.c:549)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Address 0x1594093e is 14 bytes inside a block of size 4,060 free'd
==16148==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==16148==    by 0x6597ECB: ber_free_buf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6597F34: ber_free (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x805480: _php_ldap_control_from_array (ldap.c:382)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==16148==    by 0xE15279: php_execute_script (main.c:2650)
==16148==    by 0x119DB6F: do_cli (php_cli.c:985)
==16148==  Block was alloc'd at
==16148==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==16148==    by 0x659902B: ber_memalloc_x (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x659838C: ber_realloc (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596691: ??? (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x6596CFB: ber_printf (in /lib64/liblber-2.4.so.2.10.3)
==16148==    by 0x635B591: ldap_put_vrFilter (in /lib64/libldap-2.4.so.2.10.3)
==16148==    by 0x805382: _php_ldap_control_from_array (ldap.c:374)
==16148==    by 0x806BEB: _php_ldap_controls_from_array (ldap.c:619)
==16148==    by 0x80AC9A: php_ldap_do_search (ldap.c:1601)
==16148==    by 0x80B0D2: zif_ldap_read (ldap.c:1659)
==16148==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==16148==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==16148==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==16148== 

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (295 days ago)

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