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/015.phpt ('openssl_public_encrypt() tests')

Script

1: <?php
2: $data 
"Testing openssl_public_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_public_encrypt($data$encrypted$pubkey));
14:
var_dump(openssl_public_encrypt($data$encrypted$privkey));
15:
var_dump(openssl_public_encrypt($data$encrypted$wrong));
16:
var_dump(openssl_public_encrypt($data$encrypted$obj));
17:
var_dump(openssl_public_encrypt($obj$encrypted$pubkey));
18:
openssl_private_decrypt($encrypted$output$privkey);
19:
var_dump($output);
20:
?>
21:

Report

==12945== Syscall param write(buf) points to uninitialised byte(s)
==12945==    at 0xD1D6650: __write_nocancel (in /lib64/libc-2.12.so)
==12945==    by 0xFEEC82: sapi_cli_single_write (php_cli.c:273)
==12945==    by 0xFEEE0F: sapi_cli_ub_write (php_cli.c:308)
==12945==    by 0xD545E2: php_output_op (output.c:1079)
==12945==    by 0xD514E6: php_output_write (output.c:255)
==12945==    by 0xBFF850: php_var_dump (var.c:114)
==12945==    by 0xC00130: zif_var_dump (var.c:183)
==12945==    by 0xE70D6B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==12945==    by 0xE7AD7B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==12945==    by 0xE6E9A8: execute_ex (zend_vm_execute.h:356)
==12945==    by 0xE6F53A: zend_execute (zend_vm_execute.h:381)
==12945==    by 0xE0CA32: zend_execute_scripts (zend.c:1316)
==12945==  Address 0x15352960 is 0 bytes inside a block of size 5 alloc'd
==12945==    at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==12945==    by 0xDB8224: _emalloc (zend_alloc.c:2427)
==12945==    by 0x4F1441: zif_openssl_private_decrypt (openssl.c:3938)
==12945==    by 0xE70D6B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==12945==    by 0xE7AD7B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==12945==    by 0xE6E9A8: execute_ex (zend_vm_execute.h:356)
==12945==    by 0xE6F53A: zend_execute (zend_vm_execute.h:381)
==12945==    by 0xE0CA32: zend_execute_scripts (zend.c:1316)
==12945==    by 0xD3043F: php_execute_script (main.c:2479)
==12945==    by 0xFF1374: do_cli (php_cli.c:993)
==12945==    by 0xFF2B21: main (php_cli.c:1377)
==12945== 

 

Generated at Wed, 15 May 2013 22:03:26 +0000 (7 days ago)

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