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
==6221== Syscall param write(buf) points to uninitialised byte(s)
==6221== at 0xCCC4650: __write_nocancel (in /lib64/libc-2.12.so)
==6221== by 0xEAB321: sapi_cli_single_write (php_cli.c:257)
==6221== by 0xEAB455: sapi_cli_ub_write (php_cli.c:289)
==6221== by 0xCDA8E5: php_ub_body_write_no_header (output.c:694)
==6221== by 0xCD8388: php_body_write (output.c:119)
==6221== by 0xBAF5EA: php_var_dump (var.c:114)
==6221== by 0xBAFD9C: zif_var_dump (var.c:181)
==6221== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==6221== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==6221== by 0xDB7C17: execute (zend_vm_execute.h:107)
==6221== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==6221== by 0xCB7000: php_execute_script (main.c:2316)
==6221== Address 0x14d62c10 is 0 bytes inside a block of size 5 alloc'd
==6221== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==6221== by 0xD32860: _emalloc (zend_alloc.c:2348)
==6221== by 0x4D9B36: zif_openssl_private_decrypt (openssl.c:3821)
==6221== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==6221== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==6221== by 0xDB7C17: execute (zend_vm_execute.h:107)
==6221== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==6221== by 0xCB7000: php_execute_script (main.c:2316)
==6221== by 0xEAE410: main (php_cli.c:1189)
==6221==
Generated at Sun, 19 May 2013 20:27:25 +0000 (6 days ago)
|