Bug #76741 [Fbk->NoF]: oci_bind_by_name memory allocation issue
| From: | cmb@php.net | Date: | Sun, 18 Nov 2018 22:33:10 +0000 |
| Subject: | Bug #76741 [Fbk->NoF]: oci_bind_by_name memory allocation issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218016@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76741&edit=1
ID: 76741
Updated by: cmb@php.net
Reported by: dmitry dot matora at gmail dot com
Summary: oci_bind_by_name memory allocation issue
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: OCI8 related
Operating System: Debian
PHP Version: 7.0.31
Assigned To: sixd
Block user comment: N
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2018-08-20 03:48:18] sixd@php.net
Can you give a runnable testcase and any CREATE TABLE and INSERT statements required?
------------------------------------------------------------------------
[2018-08-19 17:25:27] bukka@php.net
it doesn't seem to be fpm related...
------------------------------------------------------------------------
[2018-08-14 09:58:59] dmitry dot matora at gmail dot com
Description:
------------
looks like oci_bind_by_name has some memory allocation issue
when clave == '';
running oci_bind_by_name($stid, ":password", strtoupper($clave))
produces 'Only variables should be passed by reference' which is expected, but then all
empty strings are string(6) "\x00\x00\x00\x00\x00\x00" instead of string(0) ""
substr("", 0, 0) still produces string(0) "" though
Test script:
---------------
$clave = '';
oci_bind_by_name($stid, ":password", strtoupper($clave))
$test = ''; var_dump($test);
will produce string(6) "\x00\x00\x00\x00\x00\x00";
Expected result:
----------------
I expect
$test = ''; var_dump($test);
to produce string(0) ""
Actual result:
--------------
after reaching clave=""; oci_bind_by_name($stid, ":password",
strtoupper($clave))
$test = ''; var_dump($test);
produces string(6) "\x00\x00\x00\x00\x00\x00"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76741&edit=1