From:             cryo28 at rbcmail dot ru
Operating system: Win2000 and Linux
PHP version:      4.3.2
PHP Bug Type:     InterBase related
Bug description:  ibase_blob_get overflow

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 bug report at http://bugs.php.net/?id=24224&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24224&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24224&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24224&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24224&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24224&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24224&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24224&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24224&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24224&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24224&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24224&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24224&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24224&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24224&r=gnused

Reply via email to