#42054 [NEW]: odbc_result() crashes with NULL values
| From: | battisti at actgate dot com | Date: | Fri, 20 Jul 2007 16:42:15 +0000 |
| Subject: | #42054 [NEW]: odbc_result() crashes with NULL values | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-115257@lists.php.net to get a copy of this message | ||
From: battisti at actgate dot com
Operating system: Red Hat Enterprise Linux WS rele
PHP version: 4.4.7
PHP Bug Type: Reproducible crash
Bug description: odbc_result() crashes with NULL values
Description:
------------
The odbc_result() function crashes if the value requested is a NULL value
in the DB.
Tested on: RHEL 4 WS 64 bit
Architecture: x86_64
PHP version: 4.3.9
DB: PostgreSQL 8.2.4
unixODBC: 2.2.9
$field_value = odbc_result($this->Query_ID, $i );
where $i is an index of a NULL value in the DB.
Reproduce code:
---------------
$field_value = odbc_result($this->Query_ID, $i );
where $i is an index of a NULL value in the DB.
Expected result:
----------------
$field_value == "" or "NULL" or ERROR, but I do not expect a crash :)
Actual result:
--------------
Simply a crash!
--
Edit bug report at http://bugs.php.net/?id=42054&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42054&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42054&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42054&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42054&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42054&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42054&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42054&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42054&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42054&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42054&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42054&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42054&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42054&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42054&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42054&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42054&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42054&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42054&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42054&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42054&r=mysqlcfg