Valgrind Report for ext/openssl/tests/016.phpt ('openssl_public_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_private_encrypt($data, $encrypted, $privkey); 8: var_dump(openssl_public_decrypt($encrypted, $output, $pubkey)); 9: var_dump($output); 10: var_dump(openssl_public_decrypt($encrypted, $output2, $wrong)); 11: var_dump($output2); 12: var_dump(openssl_public_decrypt($wrong, $output3, $pubkey)); 13: var_dump($output3); 14: var_dump(openssl_public_decrypt($encrypted, $output4, array())); 15: var_dump($output4); 16: var_dump(openssl_public_decrypt($encrypted, $output5, array($pubkey))); 17: var_dump($output5); 18: var_dump(openssl_public_decrypt($encrypted, $output6, array($pubkey, ""))); 19: var_dump($output6); 20: ?> 21:
Report
==6226== Syscall param write(buf) points to uninitialised byte(s)
==6226== at 0xCCC4650: __write_nocancel (in /lib64/libc-2.12.so)
==6226== by 0xEAB321: sapi_cli_single_write (php_cli.c:257)
==6226== by 0xEAB455: sapi_cli_ub_write (php_cli.c:289)
==6226== by 0xCDA8E5: php_ub_body_write_no_header (output.c:694)
==6226== by 0xCD8388: php_body_write (output.c:119)
==6226== by 0xBAF5EA: php_var_dump (var.c:114)
==6226== by 0xBAFD9C: zif_var_dump (var.c:181)
==6226== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==6226== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==6226== by 0xDB7C17: execute (zend_vm_execute.h:107)
==6226== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==6226== by 0xCB7000: php_execute_script (main.c:2316)
==6226== Address 0x14d5f4d0 is 0 bytes inside a block of size 33 alloc'd
==6226== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==6226== by 0xD32860: _emalloc (zend_alloc.c:2348)
==6226== by 0x4DA24C: zif_openssl_public_decrypt (openssl.c:3945)
==6226== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==6226== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==6226== by 0xDB7C17: execute (zend_vm_execute.h:107)
==6226== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==6226== by 0xCB7000: php_execute_script (main.c:2316)
==6226== by 0xEAE410: main (php_cli.c:1189)
==6226==
Generated at Sun, 19 May 2013 20:27:25 +0000 (3 days ago)
|