php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24224 ibase_blob_get overflow
Submitted: 2003-06-17 09:12 UTC Modified: 2003-08-16 10:31 UTC
Votes:8
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:5 (62.5%)
Same OS:7 (87.5%)
From: cryo28 at rbcmail dot ru Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.3.2 OS: Win2000 and Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cryo28 at rbcmail dot ru
New email:
PHP Version: OS:

 

 [2003-06-17 09:12 UTC] cryo28 at rbcmail dot ru
Description:
------------
Bug was reproduced on Windows 2000 + PHP 4.3.1 + Firebird 1.0(W2K) and on RedHat Linux 9.0 + PHP 4.3.2 + Firebird 1.5 RC3(Linux).

If BLOB size > 64K actual size of data returned by ibase_blob_get equals to Actual Size minus 64K.



Reproduce code:
---------------
while ($res = fetchRow($q))	{
	$val = $res->BLOBDATA;
	$blobinfo = ibase_blob_info($val);
	$blobhndl = ibase_blob_open($val);
	$image = ibase_blob_get($blobhndl, blobinfo[0]);
	echo $blobinfo[0]."\n";
	echo strlen($image)."\n";
	ibase_blob_close($blobhndl);
}

Expected result:
----------------
Above script produces, for example, 50000 50000 if BLOBDATA size 50000.[OK]. But if BLOBDATA size more than 65535 bytes script producing something like this:

65978 442
i.e. 442=65978-65536.

ibase_blob_echo($VAL) works right.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-29 11:40 UTC] iliaa@php.net
Try applying the following patch (http://bb.prohost.org/ibase.txt) and please let me know if it fixes the problem.
 [2003-07-03 11:05 UTC] cryo28 at rbcmal dot ru
Got Warning: ibase_blob_get(): PHP module internal error in /usr/local/apache2/wwwroot/objectcms/index.php on line 21

and $image = (bool) FALSE :((

(Linux RedHat 9.0. Patch over PHP 4.3.2)
 [2003-07-04 02:11 UTC] sniper@php.net
Get the latest stable snapshot and apply the patch to it.

 [2003-07-09 17:52 UTC] sniper@php.net
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 "Open". Thank you.


 [2003-08-16 10:31 UTC] abies@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC