#21114 [NEW]: Getting BLOB (image) Field with Sybase db

2002-12-20 Thread martin . schlaak
From: [EMAIL PROTECTED]
Operating system: linux 2.4.19
PHP version:  4.2.3
PHP Bug Type: Sybase (dblib) related
Bug description:  Getting BLOB (image) Field with Sybase db 

When selecting an image field from a table sybase_query
causes a segmentation fault in apache server.
The error occures when converting datatype image to char in
file php_sybase_db.c function php_sybase_get_column_content.
The problem is that the buffer is to small for the hex-string.
The buffer had to be the double size because a char is translated in 2
bytes.
If you increase the buffersize to 2*res_length its ok.
-- 
Edit bug report at http://bugs.php.net/?id=21114&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21114&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21114&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21114&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21114&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21114&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21114&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21114&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21114&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21114&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21114&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21114&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21114&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21114&r=isapi




#21114 [Fbk->Opn]: Getting BLOB (image) Field with Sybase db

2002-12-20 Thread martin . schlaak
 ID:   21114
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Sybase (dblib) related
 Operating System: linux 2.4.19
 PHP Version:  4.2.3
 New Comment:

SQL-Server 2000 submits type SYBIMAGE as datatype.
In file php_sybase_db.c function php_sybase_get_column_content only the
types SYBBINARY and SYBVARBINARY are updated with double buffer size,
not the SYBIMAGE which is submitted from SQL2000.


Previous Comments:


[2002-12-20 10:11:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip





[2002-12-20 08:39:45] [EMAIL PROTECTED]

When selecting an image field from a table sybase_query
causes a segmentation fault in apache server.
The error occures when converting datatype image to char in
file php_sybase_db.c function php_sybase_get_column_content.
The problem is that the buffer is to small for the hex-string.
The buffer had to be the double size because a char is translated in 2
bytes.
If you increase the buffersize to 2*res_length its ok.




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