php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26201 Crahes when starting a transaction given invalid link handle
Submitted: 2003-11-11 06:06 UTC Modified: 2003-11-11 22:03 UTC
From: al at forest dot akadem dot ru Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.3.3 OS: Windows 2000
Private report: No CVE-ID:
 [2003-11-11 06:06 UTC] al at forest dot akadem dot ru
Description:
------------
Web-server crashes when I'm starting a transaction with invalid link handle (Any value not of type 'resource interbase link'). Crash happens only if link handle is _explicitly_ specified as an argument of ibase_trans().

OS: Windows 2000 (SP4)
Web-server: Apache 1.3.28
PHP as a module: 4.3.3 (wihout any changes in php.ini regarding php_interbase extension)
php_interbase: Revision 1.91.2.22 (i.e. latest available from CVS in PHP_4_3 branch)
Firebird 1.0.3

Reproduce code:
---------------
// Here are two variants of a two-line script:

$G2db = ibase_connect( 'localhost:c:\\g2-gdb\\g2.gdb', 'USERNAME', 'INVALID_PASSWORD', 'WIN1251', 0, 3);
$G2tr = ibase_trans(IBASE_READ, $G2db); 

// or:

$G2db = 123;
$G2tr = ibase_trans(IBASE_READ, $G2db); 

Expected result:
----------------
Should issue run-time error complianing about wrong argument types.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-11 06:09 UTC] al at forest dot akadem dot ru
Description:
------------
Web-server crashes when I'm starting a transaction with invalid link
handle (Any value not of type 'resource interbase link'). Crash happens
only if link handle is _explicitly_ specified as an argument of
ibase_trans().

OS: Windows 2000 (SP4)
Web-server: Apache 1.3.28
PHP as a module: 4.3.3 (wihout any changes in php.ini regarding
php_interbase extension)
php_interbase: Revision 1.91.2.22 (i.e. latest available from CVS in
PHP_4_3 branch)
Firebird 1.0.3

Reproduce code:
---------------
// Here are two variants of a two-line script:

$G2db = ibase_connect( 'localhost:c:\\g2-gdb\\g2.gdb', 'USERNAME',
'INVALID_PASSWORD', 'WIN1251', 0, 3);
$G2tr = ibase_trans(IBASE_READ, $G2db); 

// or:

$G2db = 123;
$G2tr = ibase_trans(IBASE_READ, $G2db); 

Expected result:
----------------
Should issue run-time error complianing about wrong argument types.
 [2003-11-11 22:03 UTC] iliaa@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.

Try a win32 snapshot in about 4-5 hours.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 09:02:23 2014 UTC