PHP  
 PHP_HEAD
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

==15506== Syscall param write(buf) points to uninitialised byte(s)
==15506==    at 0xD1D6650: __write_nocancel (in /lib64/libc-2.12.so)
==15506==    by 0xFCC41E: sapi_cli_single_write (php_cli.c:273)
==15506==    by 0xFCC5AB: sapi_cli_ub_write (php_cli.c:308)
==15506==    by 0xD57D56: php_output_op (output.c:1079)
==15506==    by 0xD54C5A: php_output_write (output.c:255)
==15506==    by 0xC02EFC: php_var_dump (var.c:114)
==15506==    by 0xC037DC: zif_var_dump (var.c:183)
==15506==    by 0xE742A2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:547)
==15506==    by 0xE7DEB7: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2326)
==15506==    by 0xE71E6D: execute_ex (zend_vm_execute.h:356)
==15506==    by 0xE729FF: zend_execute (zend_vm_execute.h:381)
==15506==    by 0xE1009E: zend_execute_scripts (zend.c:1316)
==15506==  Address 0x1534cd60 is 0 bytes inside a block of size 33 alloc'd
==15506==    at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==15506==    by 0xDBB998: _emalloc (zend_alloc.c:2427)
==15506==    by 0x4F29F8: zif_openssl_private_decrypt (openssl.c:4237)
==15506==    by 0xE742A2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:547)
==15506==    by 0xE7DEB7: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2326)
==15506==    by 0xE71E6D: execute_ex (zend_vm_execute.h:356)
==15506==    by 0xE729FF: zend_execute (zend_vm_execute.h:381)
==15506==    by 0xE1009E: zend_execute_scripts (zend.c:1316)
==15506==    by 0xD33BB3: php_execute_script (main.c:2481)
==15506==    by 0xFCEB10: do_cli (php_cli.c:993)
==15506==    by 0xFD02BD: main (php_cli.c:1377)
==15506== 

 

Generated at Mon, 10 Jun 2013 15:00:26 +0000 (7 days ago)

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