From: Ilia Alshanetsky Date: Wed, 12 Nov 2003 03:05:24 +0000 (+0000) Subject: Fixed bug #26201 (crash in ibase_trans() on invalid link handle). X-Git-Tag: php-4.3.5RC1~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c26e78f88a1c5b5cdc59e81b3e3ee4fab42a3fa8;p=php Fixed bug #26201 (crash in ibase_trans() on invalid link handle). --- diff --git a/NEWS b/NEWS index 8f933796b1..3f636142bd 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ PHP 4 NEWS ?? ??? 2003, Version 4.3.5 - Fixed header handler in NSAPI SAPI module (header->replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) +- Fixed bug #26201 (crash in ibase_trans() on invalid link handle). (Ilia) - Fixed bug #26198 (strtotime() handling of M/F Y date format). (Ilia) - Fixed bug #26176 (Fixed handling of numeric keys in INI files). (Ilia) - Fixed bug #26168 (shtool availability check in phpize). diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index ab60f9f84d..0a58ca01b8 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -1493,7 +1493,7 @@ PHP_FUNCTION(ibase_trans) zval ***args; char tpb[20], *tpbp = NULL; long trans_argl = 0; - int tpb_len = 0, argn, link_id, trans_n = 0, i; + int tpb_len = 0, argn, link_id = 0, trans_n = 0, i; ibase_db_link *ib_link; ibase_tr_link *ib_trans; @@ -1528,7 +1528,7 @@ PHP_FUNCTION(ibase_trans) efree(args); } - if (argn < 2) { + if (!link_id) { ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, NULL, link_id, "InterBase link", le_link, le_plink); }