|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76741 oci_bind_by_name memory allocation issue
Submitted: 2018-08-14 09:58 UTC Modified: 2018-11-18 22:33 UTC
From: dmitry dot matora at gmail dot com Assigned: sixd (profile)
Status: No Feedback Package: OCI8 related
PHP Version: 7.0.31 OS: Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dmitry dot matora at gmail dot com
New email:
PHP Version: OS:


 [2018-08-14 09:58 UTC] dmitry dot matora at gmail dot com
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"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-19 17:25 UTC]
-Package: FPM related +Package: OCI8 related
 [2018-08-19 17:25 UTC]
it doesn't seem to be fpm related...
 [2018-08-20 03:48 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: sixd
 [2018-08-20 03:48 UTC]
Can you give a runnable testcase and any CREATE TABLE and INSERT statements required?
 [2018-11-18 22:33 UTC]
-Status: Feedback +Status: No Feedback
 [2018-11-18 22:33 UTC]
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.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Dec 05 03:01:26 2023 UTC