PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

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

==3380== Syscall param write(buf) points to uninitialised byte(s)
==3380==    at 0xD1D6650: __write_nocancel (in /lib64/libc-2.12.so)
==3380==    by 0xFEFAB2: sapi_cli_single_write (php_cli.c:273)
==3380==    by 0xFEFC3F: sapi_cli_ub_write (php_cli.c:308)
==3380==    by 0xD5546A: php_output_op (output.c:1079)
==3380==    by 0xD5236E: php_output_write (output.c:255)
==3380==    by 0xC006B4: php_var_dump (var.c:114)
==3380==    by 0xC00F94: zif_var_dump (var.c:183)
==3380==    by 0xE71B9B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==3380==    by 0xE7BBAB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==3380==    by 0xE6F7D8: execute_ex (zend_vm_execute.h:356)
==3380==    by 0xE7036A: zend_execute (zend_vm_execute.h:381)
==3380==    by 0xE0D7B2: zend_execute_scripts (zend.c:1316)
==3380==  Address 0x15347ab0 is 0 bytes inside a block of size 33 alloc'd
==3380==    at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==3380==    by 0xDB90AC: _emalloc (zend_alloc.c:2427)
==3380==    by 0x4F1491: zif_openssl_private_decrypt (openssl.c:3938)
==3380==    by 0xE71B9B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==3380==    by 0xE7BBAB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==3380==    by 0xE6F7D8: execute_ex (zend_vm_execute.h:356)
==3380==    by 0xE7036A: zend_execute (zend_vm_execute.h:381)
==3380==    by 0xE0D7B2: zend_execute_scripts (zend.c:1316)
==3380==    by 0xD312C7: php_execute_script (main.c:2481)
==3380==    by 0xFF21A4: do_cli (php_cli.c:993)
==3380==    by 0xFF3951: main (php_cli.c:1377)
==3380== 

 

Generated at Sat, 08 Jun 2013 10:22:27 +0000 (10 days ago)

Copyright © 2005-2013 The PHP Group
All rights reserved.