#24224 [Fbk->NoF]: ibase_blob_get overflow
| From: | sniper@php.net | Date: | Wed, 09 Jul 2003 22:52:49 +0000 |
| Subject: | #24224 [Fbk->NoF]: ibase_blob_get overflow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-43585@lists.php.net to get a copy of this message | ||
ID: 24224
Updated by: sniper@php.net
Reported By: cryo28 at rbcmail dot ru
-Status: Feedback
+Status: No Feedback
Bug Type: InterBase related
Operating System: Win2000 and Linux
PHP Version: 4.3.2
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 "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-07-04 02:11:22] sniper@php.net
Get the latest stable snapshot and apply the patch to it.
------------------------------------------------------------------------
[2003-07-03 11:05:46] 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-06-29 11:40:39] 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-06-17 09:12:28] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24224&edit=1