sniper Sat Mar 15 19:38:52 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4 NEWS
/php4/ext/interbase interbase.c
Log:
MFH: - Fixed bug #22709 (crash within interbase when database unavailable)
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.142 php4/NEWS:1.1247.2.143
--- php4/NEWS:1.1247.2.142 Sat Mar 15 19:03:27 2003
+++ php4/NEWS Sat Mar 15 19:38:51 2003
@@ -29,6 +29,7 @@
- Fixed a bug in GD's truecolor TTF handling. (Derick)
- Fixed several 64-bit problems. (Dave)
- Fixed several errors in hwapi extension. Objects weren't handled properly. (Uwe)
+- Fixed bug #22709 (Crash in interbase when database unavailable). (Vladimir Michl)
- Fixed bug #22681 (Crash when reading from invalid file pointer). (Ilia)
- Fixed bug #22616 (Wrong order of -lssl and -lcrypto with IMAP). (Jani)
- Fixed bug #22613 (imagettfbox() does not add the kerning distance to the
Index: php4/ext/interbase/interbase.c
diff -u php4/ext/interbase/interbase.c:1.91.2.3 php4/ext/interbase/interbase.c:1.91.2.4
--- php4/ext/interbase/interbase.c:1.91.2.3 Fri Mar 14 12:38:18 2003
+++ php4/ext/interbase/interbase.c Sat Mar 15 19:38:51 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.91.2.3 2003/03/14 17:38:18 sniper Exp $ */
+/* $Id: interbase.c,v 1.91.2.4 2003/03/16 00:38:51 sniper Exp $ */
/* TODO: Arrays, roles?
@@ -609,7 +609,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.3 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.4 $");
#ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "yes");
#endif
@@ -1578,6 +1578,11 @@
{
TSRMLS_FETCH();
+ if (ib_link == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database link");
+ return FAILURE;
+ }
+
if (trans_n == 0 && ib_link->trans[0] == NULL) {
if (isc_start_transaction(IB_STATUS, &ib_link->trans[0], 1,
&ib_link->link, 0, NULL)) {
_php_ibase_error(TSRMLS_C);
@@ -1613,6 +1618,11 @@
default:
WRONG_PARAM_COUNT;
break;
+ }
+
+ if (ib_link == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database link");
+ RETURN_FALSE;
}
if (ib_link->trans[trans_n] == NULL) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php