Valgrind Report for ext/openssl/tests/014.phpt ('openssl_private_encrypt() tests')
Script
1:
<?php 2: $data = "Testing openssl_private_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_private_encrypt($data, $encrypted, $privkey)); 14: var_dump(openssl_private_encrypt($data, $encrypted, $pubkey)); 15: var_dump(openssl_private_encrypt($data, $encrypted, $wrong)); 16: var_dump(openssl_private_encrypt($data, $encrypted, $obj)); 17: var_dump(openssl_private_encrypt($obj, $encrypted, $privkey)); 18: openssl_public_decrypt($encrypted, $output, $pubkey); 19: var_dump($output); 20: ?> 21:
Report
==26089== Syscall param write(buf) points to uninitialised byte(s)
==26089== at 0xD1D6650: __write_nocancel (in /lib64/libc-2.12.so)
==26089== by 0xFF07B2: sapi_cli_single_write (php_cli.c:273)
==26089== by 0xFF093F: sapi_cli_ub_write (php_cli.c:308)
==26089== by 0xD560A2: php_output_op (output.c:1079)
==26089== by 0xD52FA6: php_output_write (output.c:255)
==26089== by 0xC01310: php_var_dump (var.c:114)
==26089== by 0xC01BF0: zif_var_dump (var.c:183)
==26089== by 0xE7289D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:547)
==26089== by 0xE7C8AD: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2326)
==26089== by 0xE70468: execute_ex (zend_vm_execute.h:356)
==26089== by 0xE70FFA: zend_execute (zend_vm_execute.h:381)
==26089== by 0xE0E4F2: zend_execute_scripts (zend.c:1316)
==26089== Address 0x15358c60 is 0 bytes inside a block of size 5 alloc'd
==26089== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==26089== by 0xDB9CE4: _emalloc (zend_alloc.c:2427)
==26089== by 0x4F3142: zif_openssl_public_decrypt (openssl.c:4361)
==26089== by 0xE7289D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:547)
==26089== by 0xE7C8AD: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2326)
==26089== by 0xE70468: execute_ex (zend_vm_execute.h:356)
==26089== by 0xE70FFA: zend_execute (zend_vm_execute.h:381)
==26089== by 0xE0E4F2: zend_execute_scripts (zend.c:1316)
==26089== by 0xD31EFF: php_execute_script (main.c:2479)
==26089== by 0xFF2EA4: do_cli (php_cli.c:993)
==26089== by 0xFF4651: main (php_cli.c:1377)
==26089==
Generated at Fri, 17 May 2013 23:23:52 +0000 (7 days ago)
|