Valgrind Report for ext/openssl/tests/017.phpt ('openssl_private_decrypt() tests')
Script
1:
<?php 2: $data = "Testing openssl_public_decrypt()"; 3: $privkey = "file://" . dirname(__FILE__) . "/private.key"; 4: $pubkey = "file://" . dirname(__FILE__) . "/public.key"; 5: $wrong = "wrong"; 6: 7: openssl_public_encrypt($data, $encrypted, $pubkey); 8: var_dump(openssl_private_decrypt($encrypted, $output, $privkey)); 9: var_dump($output); 10: var_dump(openssl_private_decrypt($encrypted, $output2, $wrong)); 11: var_dump($output2); 12: var_dump(openssl_private_decrypt($wrong, $output3, $privkey)); 13: var_dump($output3); 14: var_dump(openssl_private_decrypt($encrypted, $output4, array($privkey))); 15: var_dump($output4); 16: var_dump(openssl_private_decrypt($encrypted, $output5, array($privkey, ""))); 17: var_dump($output5); 18: ?> 19:
Report
==10798== Syscall param write(buf) points to uninitialised byte(s)
==10798== at 0xCCC4650: __write_nocancel (in /lib64/libc-2.12.so)
==10798== by 0xEAAC5D: sapi_cli_single_write (php_cli.c:257)
==10798== by 0xEAAD91: sapi_cli_ub_write (php_cli.c:289)
==10798== by 0xCDA371: php_ub_body_write_no_header (output.c:694)
==10798== by 0xCD7E14: php_body_write (output.c:119)
==10798== by 0xBAF076: php_var_dump (var.c:114)
==10798== by 0xBAF828: zif_var_dump (var.c:181)
==10798== by 0xDB850E: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==10798== by 0xDBE7ED: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==10798== by 0xDB7553: execute (zend_vm_execute.h:107)
==10798== by 0xD6AB43: zend_execute_scripts (zend.c:1259)
==10798== by 0xCB6A8C: php_execute_script (main.c:2316)
==10798== Address 0x14d57040 is 0 bytes inside a block of size 33 alloc'd
==10798== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==10798== by 0xD322EC: _emalloc (zend_alloc.c:2348)
==10798== by 0x4D9B36: zif_openssl_private_decrypt (openssl.c:3821)
==10798== by 0xDB850E: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==10798== by 0xDBE7ED: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==10798== by 0xDB7553: execute (zend_vm_execute.h:107)
==10798== by 0xD6AB43: zend_execute_scripts (zend.c:1259)
==10798== by 0xCB6A8C: php_execute_script (main.c:2316)
==10798== by 0xEADD4C: main (php_cli.c:1189)
==10798==
Generated at Sun, 12 May 2013 02:17:03 +0000 (7 days ago)
|