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