Hi

For ibase_query.c the unified diff is:

diff -u -r1.23.2.1.2.10 ibase_query.c
--- ibase_query.c 7 Jun 2007 08:59:00 -0000 1.23.2.1.2.10
+++ ibase_query.c 23 Oct 2007 18:18:28 -0000
@@ -144,8 +144,13 @@
}
if (ib_query->stmt) {
IBDEBUG("Dropping statement handle (free_query)...");
- if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)) {
- _php_ibase_error(TSRMLS_C);
+ /* Bugfix #39397: Only free statement if db-connection is still open */
+ char db_items[] = {isc_info_page_size}, res_buf[40];
+ if (SUCCESS == isc_database_info(IB_STATUS, &ib_query->link->handle,
+ sizeof(db_items), db_items, sizeof(res_buf), res_buf)) {
+ if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)) {
+ _php_ibase_error(TSRMLS_C);
+ }
}
}
if (ib_query->in_array) {
@@ -302,6 +307,12 @@
static char info_type[] = {isc_info_sql_stmt_type};
char result[8];
+ /* Bugfix #32143: Crashing IBserver 7 with empty querystring */
+ if (*query == '\0') {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Querystring empty.");
+ return FAILURE;
+ }
+
ib_query->link = link;
ib_query->trans = trans;
ib_query->result_res_id = 0;
@@ -1288,9 +1299,23 @@
static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* 
{{{ */
int scale, int flag TSRMLS_DC)
{
- static ISC_INT64 const scales[] = { 1, 10, 100, 1000, 10000, 100000, 
1000000, 100000000, 1000000000,
- 1000000000, 
LL_LIT(10000000000),LL_LIT(100000000000),LL_LIT(10000000000000),LL_LIT(100000000000000),
- 
LL_LIT(1000000000000000),LL_LIT(1000000000000000),LL_LIT(1000000000000000000) 
 };
+ static ISC_INT64 const scales[] = { 1, 10, 100, 1000,
+ 10000,
+ 100000,
+ 1000000,
+ 10000000,
+ 100000000,
+ 1000000000,
+ LL_LIT(10000000000),
+ LL_LIT(100000000000),
+ LL_LIT(1000000000000),
+ LL_LIT(10000000000000),
+ LL_LIT(100000000000000),
+ LL_LIT(1000000000000000),
+ LL_LIT(10000000000000000),
+ LL_LIT(100000000000000000),
+ LL_LIT(1000000000000000000)
+ };
switch (type & ~1) {
unsigned short l;

"Antony Dovgal" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
> On 24.10.2007 02:11, Lars Westermann wrote:
>> Hi!
>>
>> I've had a long mail-dialogue with Wez regarding bugfixes for the 
>> Interbase
>> modules (the old interbase and the new PDO version). In the PHP_5_3 
>> branch I
>> have worked on the files mentioned below. As these files aren't changed 
>> from
>> the PHP_5_2 branch, the bugfixes will easily go into the PHP_5_2 branch 
>> as
>> well.
>>
>> I have attached the file for someone to review/comment before I commit
>> anything.
>
> Please attach unified diffs (diff -u), not the patched files.
> Also separate diffs for each bug (with comments) are very welcome.
>
> -- 
> Wbr,
> Antony Dovgal 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to