Valgrind Report for ext/openssl/tests/015.phpt ('openssl_public_encrypt() tests')
Script
1:
<?php 2: $data = "Testing openssl_public_encrypt()"; 3: $privkey = "file://" . dirname(__FILE__) . "/private.key"; 4: $pubkey = "file://" . dirname(__FILE__) . "/public.key"; 5: $wrong = "wrong"; 6: class test { 7: function __toString() { 8: return "test"; 9: } 10: } 11: $obj = new test; 12: 13: var_dump(openssl_public_encrypt($data, $encrypted, $pubkey)); 14: var_dump(openssl_public_encrypt($data, $encrypted, $privkey)); 15: var_dump(openssl_public_encrypt($data, $encrypted, $wrong)); 16: var_dump(openssl_public_encrypt($data, $encrypted, $obj)); 17: var_dump(openssl_public_encrypt($obj, $encrypted, $pubkey)); 18: openssl_private_decrypt($encrypted, $output, $privkey); 19: var_dump($output); 20: ?> 21:
Report
==14486== Syscall param write(buf) points to uninitialised byte(s)
==14486== at 0xCFCA650: __write_nocancel (in /lib64/libc-2.12.so)
==14486== by 0xF436EC: sapi_cli_single_write (php_cli.c:270)
==14486== by 0xF43879: sapi_cli_ub_write (php_cli.c:305)
==14486== by 0xCCD54C: php_output_op (output.c:1079)
==14486== by 0xCCA4EB: php_output_write (output.c:255)
==14486== by 0xB8645C: php_var_dump (var.c:114)
==14486== by 0xB86D06: zif_var_dump (var.c:183)
==14486== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==14486== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==14486== by 0xDD33CC: execute (zend_vm_execute.h:410)
==14486== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==14486== by 0xCAA557: php_execute_script (main.c:2494)
==14486== Address 0x14d73710 is 0 bytes inside a block of size 5 alloc'd
==14486== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==14486== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==14486== by 0x4DEF22: zif_openssl_private_decrypt (openssl.c:3877)
==14486== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==14486== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==14486== by 0xDD33CC: execute (zend_vm_execute.h:410)
==14486== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==14486== by 0xCAA557: php_execute_script (main.c:2494)
==14486== by 0xF45C87: do_cli (php_cli.c:988)
==14486== by 0xF472C4: main (php_cli.c:1364)
==14486==
Generated at Tue, 21 May 2013 17:04:51 +0000 (2 days ago)
|