#20467 [Opn->Csd]: Buffer overflow returning binary

From: Date: Wed, 11 Dec 2002 14:35:58 +0000
Subject: #20467 [Opn->Csd]: Buffer overflow returning binary
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27342@lists.php.net to get a copy of this message
 ID:               20467
 Updated by:       sesser@php.net
 Reported By:      freddy77@angelfire.com
-Status:           Open
+Status:           Closed
 Bug Type:         Sybase (dblib) related
 Operating System: Linux
 PHP Version:      4.2.3
 New Comment:

No. The typo was already fixed.


Previous Comments:
------------------------------------------------------------------------

[2002-12-11 05:03:21] freddy77@angelfire.com

Perhaps is better to reopen

------------------------------------------------------------------------

[2002-12-10 14:04:46] freddy77@angelfire.com

dbconvert is called passing res_length as source length. This can cause
problems...

Row 

dbconvert(NULL,coltype(offset),dbdata(sybase_ptr->link,offset),
res_length,SYBCHAR,res_buf,res_length);

should be replaced with

dbconvert(NULL,coltype(offset),dbdata(sybase_ptr->link,offset),
src_length,SYBCHAR,res_buf,res_length);

freddy77

------------------------------------------------------------------------

[2002-12-10 09:44:50] sesser@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.



------------------------------------------------------------------------

[2002-12-09 04:11:36] freddy77@angelfire.com

You have also to decide what result you want for binary data.
If you use dbconvert for this type your results will be a hexadecimal
string. If you want binary data instead you should manually copy data
(use just memcpy) or do a conversion to binary, not to characters.

freddy77

------------------------------------------------------------------------

[2002-12-07 01:29:42] iliaa@php.net

Someone familiar with the workings of the sybase extension should
definately review the patch and make the necessary corrections before
the next RC is out.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/20467

-- 
Edit this bug report at http://bugs.php.net/?id=20467&edit=1



Thread (10 messages)

« previous php.bugs (#27342) next »