diff options
Diffstat (limited to 'ext/interbase')
| -rw-r--r-- | ext/interbase/ibase_blobs.c | 13 | ||||
| -rw-r--r-- | ext/interbase/ibase_events.c | 4 | ||||
| -rw-r--r-- | ext/interbase/ibase_query.c | 44 | ||||
| -rw-r--r-- | ext/interbase/ibase_service.c | 22 | ||||
| -rw-r--r-- | ext/interbase/interbase.c | 35 | ||||
| -rw-r--r-- | ext/interbase/interbase.rc | 4 | ||||
| -rwxr-xr-x | ext/interbase/php_ibase_includes.h | 4 | ||||
| -rw-r--r-- | ext/interbase/php_ibase_udf.c | 6 | ||||
| -rw-r--r-- | ext/interbase/php_interbase.h | 4 |
9 files changed, 71 insertions, 65 deletions
diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c index 4054c92c1..98e686781 100644 --- a/ext/interbase/ibase_blobs.c +++ b/ext/interbase/ibase_blobs.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_blobs.c,v 1.9.2.1 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: ibase_blobs.c,v 1.9.2.1.2.3 2007/02/24 02:17:24 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -74,16 +74,15 @@ int _php_ibase_string_to_quad(char const *id, ISC_QUAD *qd) /* {{{ */ char *_php_ibase_quad_to_string(ISC_QUAD const qd) /* {{{ */ { - char *result = (char *) emalloc(BLOB_ID_LEN+1); + char *result; /* shortcut for most common case */ if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) { - sprintf(result, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd); + spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd); } else { ISC_UINT64 res = ((ISC_UINT64) qd.gds_quad_high << 0x20) | qd.gds_quad_low; - sprintf(result, "0x%0*" LL_MASK "x", 16, res); + spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, res); } - result[BLOB_ID_LEN] = '\0'; return result; } /* }}} */ @@ -105,7 +104,7 @@ int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, unsigned long m unsigned long cur_len; unsigned short seg_len; - bl_data = emalloc(max_len + 1); + bl_data = safe_emalloc(1, max_len, 1); for (cur_len = stat = 0; (stat == 0 || stat == isc_segment) && cur_len < max_len; cur_len += seg_len) { diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c index 47be9f24c..74d131759 100644 --- a/ext/interbase/ibase_events.c +++ b/ext/interbase/ibase_events.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_events.c,v 1.8.2.1 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: ibase_events.c,v 1.8.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index 79c27b24e..f961a9c82 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_query.c,v 1.23.2.1 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: ibase_query.c,v 1.23.2.1.2.9 2007/03/15 22:33:04 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -603,9 +603,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, / break; default: convert_to_string(val); - strncpy(buf, Z_STRVAL_P(val), array->el_size); - buf[array->el_size-1] = '\0'; - } + strlcpy(buf, Z_STRVAL_P(val), buf_size); + } } } return SUCCESS; @@ -675,8 +674,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval ***b_vars, BIND_BUF *buf, /* {{{ case SQL_TYPE_DATE: case SQL_TYPE_TIME: if (Z_TYPE_P(b_var) == IS_LONG) { - /* insert timestamp directly */ - t = *gmtime(&Z_LVAL_P(b_var)); + php_gmtime_r(&Z_LVAL_P(b_var), &t); } else { #ifdef HAVE_STRPTIME char *format = INI_STR("ibase.timestampformat"); @@ -690,7 +688,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval ***b_vars, BIND_BUF *buf, /* {{{ case SQL_TYPE_TIME: format = INI_STR("ibase.timeformat"); } - if (! strptime(Z_STRVAL_P(b_var), format, &t)) { + if (!strptime(Z_STRVAL_P(b_var), format, &t)) { /* strptime() cannot handle it, so let IB have a try */ break; } @@ -1118,7 +1116,7 @@ PHP_FUNCTION(ibase_query) } case 1: case 0: - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() ? 1 : 0 TSRMLS_CC, "s|z", &query, + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() ? 1 : 0 TSRMLS_CC, "s", &query, &query_len)) { ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, NULL, IBG(default_link), LE_LINK, le_link, le_plink); @@ -1147,7 +1145,7 @@ PHP_FUNCTION(ibase_query) break; } } else if (bind_n > 0) { - bind_args = (zval ***) emalloc(sizeof(zval **) * ZEND_NUM_ARGS()); + bind_args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); if (FAILURE == zend_get_parameters_array_ex(ZEND_NUM_ARGS(), bind_args)) { break; @@ -1318,17 +1316,17 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{ goto _sql_long; #else if (scale == 0) { - l = sprintf(string_data, "%" LL_MASK "d", *(ISC_INT64 *) data); + l = slprintf(string_data, sizeof(string_data), "%" LL_MASK "d", *(ISC_INT64 *) data); ZVAL_STRINGL(val,string_data,l,1); } else { ISC_INT64 n = *(ISC_INT64 *) data, f = scales[-scale]; if (n >= 0) { - l = sprintf(string_data, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, n % f); + l = slprintf(string_data, sizeof(string_data), "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, n % f); } else if (n <= -f) { - l = sprintf(string_data, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, -n % f); + l = slprintf(string_data, sizeof(string_data), "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, -n % f); } else { - l = sprintf(string_data, "-0.%0*" LL_MASK "d", -scale, -n % f); + l = slprintf(string_data, sizeof(string_data), "-0.%0*" LL_MASK "d", -scale, -n % f); } ZVAL_STRINGL(val,string_data,l,1); } @@ -1343,11 +1341,11 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{ long f = (long) scales[-scale]; if (n >= 0) { - l = sprintf(string_data, "%ld.%0*ld", n / f, -scale, n % f); + l = slprintf(string_data, sizeof(string_data), "%ld.%0*ld", n / f, -scale, n % f); } else if (n <= -f) { - l = sprintf(string_data, "%ld.%0*ld", n / f, -scale, -n % f); + l = slprintf(string_data, sizeof(string_data), "%ld.%0*ld", n / f, -scale, -n % f); } else { - l = sprintf(string_data, "-0.%0*ld", -scale, -n % f); + l = slprintf(string_data, sizeof(string_data), "-0.%0*ld", -scale, -n % f); } ZVAL_STRINGL(val,string_data,l,1); } @@ -1387,14 +1385,14 @@ format_date_time: #else switch (type & ~1) { default: - l = sprintf(string_data, "%02d/%02d/%4d %02d:%02d:%02d", t.tm_mon+1, t.tm_mday, + l = slprintf(string_data, sizeof(string_data), "%02d/%02d/%4d %02d:%02d:%02d", t.tm_mon+1, t.tm_mday, t.tm_year + 1900, t.tm_hour, t.tm_min, t.tm_sec); break; case SQL_TYPE_DATE: - l = sprintf(string_data, "%02d/%02d/%4d", t.tm_mon + 1, t.tm_mday, t.tm_year+1900); + l = slprintf(string_data, sizeof(string_data), "%02d/%02d/%4d", t.tm_mon + 1, t.tm_mday, t.tm_year+1900); break; case SQL_TYPE_TIME: - l = sprintf(string_data, "%02d:%02d:%02d", t.tm_hour, t.tm_min, t.tm_sec); + l = slprintf(string_data, sizeof(string_data), "%02d:%02d:%02d", t.tm_hour, t.tm_min, t.tm_sec); break; } #endif @@ -1526,7 +1524,7 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type) Z_ARRVAL_P(return_value),alias,strlen(alias)+1,&p)) { case '\0': - sprintf(alias = buf, "%s_%02d", base, i++); + snprintf(alias = buf, sizeof(buf), "%s_%02d", base, i++); } } } @@ -1939,7 +1937,7 @@ static void _php_ibase_field_info(zval *return_value, XSQLVAR *var) /* {{{ */ add_index_stringl(return_value, 2, var->relname, var->relname_length, 1); add_assoc_stringl(return_value, "relation", var->relname, var->relname_length, 1); - len = sprintf(buf, "%d", var->sqllen); + len = slprintf(buf, 16, "%d", var->sqllen); add_index_stringl(return_value, 3, buf, len, 1); add_assoc_stringl(return_value, "length", buf, len, 1); @@ -1958,7 +1956,7 @@ static void _php_ibase_field_info(zval *return_value, XSQLVAR *var) /* {{{ */ precision = 18; break; } - len = sprintf(buf, "NUMERIC(%d,%d)", precision, -var->sqlscale); + len = slprintf(buf, 16, "NUMERIC(%d,%d)", precision, -var->sqlscale); add_index_stringl(return_value, 4, s, len, 1); add_assoc_stringl(return_value, "type", s, len, 1); } else { diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c index 517f366ab..8e424ed10 100644 --- a/ext/interbase/ibase_service.c +++ b/ext/interbase/ibase_service.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_service.c,v 1.11.2.2 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: ibase_service.c,v 1.11.2.2.2.5 2007/03/06 00:24:00 stas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -160,7 +160,7 @@ static void _php_ibase_user(INTERNAL_FUNCTION_PARAMETERS, char operation) /* {{{ for (i = 0; i < sizeof(user_flags); ++i) { if (args[i] != NULL) { - int chunk = snprintf(&buf[spb_len], sizeof(buf) - spb_len, "%c%c%c%s", + int chunk = slprintf(&buf[spb_len], sizeof(buf) - spb_len, "%c%c%c%s", user_flags[i], (char)args_len[i], (char)(args_len[i] >> 8), args[i]); if ((spb_len + chunk) > sizeof(buf) || chunk <= 0) { @@ -224,7 +224,7 @@ PHP_FUNCTION(ibase_service_attach) } /* construct the spb, hack the service name into it as well */ - spb_len = snprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c%s" "%s:service_mgr", + spb_len = slprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c%s" "%s:service_mgr", isc_spb_version, isc_spb_current_version, isc_spb_user_name, (char)ulen, user, isc_spb_password, (char)plen, pass, host); @@ -322,7 +322,7 @@ query_loop: heap_p = heap_buf + res_size; } result += 2; - sprintf(heap_p, "%s\n", result); + snprintf(heap_p, heap_buf_size - (heap_buf - heap_p), "%s\n", result); heap_p += line_len +2; goto query_loop; /* repeat until result is exhausted */ @@ -425,7 +425,8 @@ static void _php_ibase_backup_restore(INTERNAL_FUNCTION_PARAMETERS, char operati */ zval *res; char *db, *bk, buf[200]; - long dblen, bklen, spb_len, opts = 0; + int dblen, bklen, spb_len; + long opts = 0; zend_bool verbose = 0; ibase_service *svm; @@ -440,7 +441,7 @@ static void _php_ibase_backup_restore(INTERNAL_FUNCTION_PARAMETERS, char operati "Interbase service manager handle", le_service); /* fill the param buffer */ - spb_len = snprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c%c%s%c%c%c%c%c", + spb_len = slprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c%c%s%c%c%c%c%c", operation, isc_spb_dbname, (char)dblen, (char)(dblen >> 8), db, isc_spb_bkp_file, (char)bklen, (char)(bklen >> 8), bk, isc_spb_options, (char)opts,(char)(opts >> 8), (char)(opts >> 16), (char)(opts >> 24)); @@ -489,7 +490,8 @@ static void _php_ibase_service_action(INTERNAL_FUNCTION_PARAMETERS, char svc_act { zval *res; char buf[128], *db; - long action, spb_len, dblen, argument = 0; + int dblen, spb_len; + long action, argument = 0; ibase_service *svm; RESET_ERRMSG; @@ -542,7 +544,7 @@ options_argument: case isc_spb_prp_deny_new_transactions: case isc_spb_prp_deny_new_attachments: case isc_spb_prp_set_sql_dialect: - spb_len = snprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c%c%c%c", + spb_len = slprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c%c%c%c", svc_action, isc_spb_dbname, (char)dblen, (char)(dblen >> 8), db, (char)action, (char)argument, (char)(argument >> 8), (char)(argument >> 16), (char)(argument >> 24)); @@ -551,7 +553,7 @@ options_argument: case isc_spb_prp_reserve_space: case isc_spb_prp_write_mode: case isc_spb_prp_access_mode: - spb_len = snprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c", + spb_len = slprintf(buf, sizeof(buf), "%c%c%c%c%s%c%c", isc_action_svc_properties, isc_spb_dbname, (char)dblen, (char)(dblen >> 8), db, (char)action, (char)argument); } diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 41abb23ff..f75ef8b4f 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.c,v 1.225.2.4.2.1 2006/06/15 18:33:07 dmitry Exp $ */ +/* $Id: interbase.c,v 1.225.2.4.2.7 2007/02/28 10:37:07 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -542,7 +542,7 @@ PHP_MINFO_FUNCTION(ibase) #endif #ifdef FB_API_VER - sprintf( (s = tmp), "Firebird API version %d", FB_API_VER); + snprintf( (s = tmp), sizeof(tmp), "Firebird API version %d", FB_API_VER); #elif (SQLDA_CURRENT_VERSION > 1) s = "Interbase 7.0 and up"; #elif !defined(DSC_null) @@ -588,22 +588,28 @@ static char const dpb_args[] = { int _php_ibase_attach_db(char **args, int *len, long *largs, isc_db_handle *db TSRMLS_DC) { - short i; + short i, dpb_len, buf_len = 256; char dpb_buffer[256] = { isc_dpb_version1 }, *dpb; dpb = dpb_buffer + 1; for (i = 0; i < sizeof(dpb_args); ++i) { - if (dpb_args[i] && args[i] && len[i]) { - dpb += sprintf(dpb, "%c%c%s", dpb_args[i],(unsigned char)len[i],args[i]); + if (dpb_args[i] && args[i] && len[i] && buf_len > 0) { + dpb_len = slprintf(dpb, buf_len, "%c%c%s", dpb_args[i],(unsigned char)len[i],args[i]); + dpb += dpb_len; + buf_len -= dpb_len; } } - if (largs[BUF]) { - dpb += sprintf(dpb, "%c\2%c%c", isc_dpb_num_buffers, + if (largs[BUF] && buf_len > 0) { + dpb_len = slprintf(dpb, buf_len, "%c\2%c%c", isc_dpb_num_buffers, (char)(largs[BUF] >> 8), (char)(largs[BUF] & 0xff)); + dpb += dpb_len; + buf_len -= dpb_len; } - if (largs[SYNC]) { - dpb += sprintf(dpb, "%c\1%c", isc_dpb_force_write, largs[SYNC] == isc_spb_prp_wm_sync ? 1 : 0); + if (largs[SYNC] && buf_len > 0) { + dpb_len = slprintf(dpb, buf_len, "%c\1%c", isc_dpb_force_write, largs[SYNC] == isc_spb_prp_wm_sync ? 1 : 0); + dpb += dpb_len; + buf_len -= dpb_len; } if (isc_attach_database(IB_STATUS, (short)len[DB], args[DB], db, (short)(dpb-dpb_buffer), dpb_buffer)) { _php_ibase_error(TSRMLS_C); @@ -1164,7 +1170,7 @@ PHP_FUNCTION(ibase_gen_id) PHP_IBASE_LINK_TRANS(link, ib_link, trans); - sprintf(query, "SELECT GEN_ID(%s,%ld) FROM rdb$database", generator, inc); + snprintf(query, sizeof(query), "SELECT GEN_ID(%s,%ld) FROM rdb$database", generator, inc); /* allocate a minimal descriptor area */ out_sqlda.sqln = out_sqlda.sqld = 1; @@ -1186,10 +1192,11 @@ PHP_FUNCTION(ibase_gen_id) /* don't return the generator value as a string unless it doesn't fit in a long */ #if SIZEOF_LONG < 8 if (result < LONG_MIN || result > LONG_MAX) { - char res[24]; + char *res; + int l; - sprintf(res, "%" LL_MASK "d", result); - RETURN_STRING(res,1); + l = spprintf(&res, 0, "%" LL_MASK "d", result); + RETURN_STRINGL(res, l, 0); } #endif RETURN_LONG((long)result); diff --git a/ext/interbase/interbase.rc b/ext/interbase/interbase.rc index 16bd6a966..b5e3f755c 100644 --- a/ext/interbase/interbase.rc +++ b/ext/interbase/interbase.rc @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@ +----------------------------------------------------------------------+
*/
-/* $Id: interbase.rc,v 1.7.2.1 2006/01/01 12:50:08 sniper Exp $ */
+/* $Id: interbase.rc,v 1.7.2.1.2.1 2007/01/01 19:32:10 iliaa Exp $ */
#ifdef APSTUDIO_INVOKED
#error This file cannot be opened from the Visual Studio IDE
diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h index 803ef47ba..45c26eaf3 100755 --- a/ext/interbase/php_ibase_includes.h +++ b/ext/interbase/php_ibase_includes.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ibase_includes.h,v 1.16.2.1 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: php_ibase_includes.h,v 1.16.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */ #ifndef PHP_IBASE_INCLUDES_H #define PHP_IBASE_INCLUDES_H diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c index cb34947e0..c07af4343 100644 --- a/ext/interbase/php_ibase_udf.c +++ b/ext/interbase/php_ibase_udf.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ibase_udf.c,v 1.9.2.1 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: php_ibase_udf.c,v 1.9.2.1.2.2 2007/03/12 23:21:41 iliaa Exp $ */ /** * This UDF library adds the ability to call PHP functions from SQL @@ -145,7 +145,7 @@ static void __attribute__((destructor)) fini() void exec_php(BLOBCALLBACK b, PARAMDSC *res, ISC_SHORT *init) { int result, remaining = b->blob_total_length, i = 0; - char *code = malloc(remaining+1); + char *code = pemalloc(remaining+1, 1); ISC_USHORT read; for (code[remaining] = '\0'; remaining > 0; remaining -= read) diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h index abf38ba48..0d443133f 100644 --- a/ext/interbase/php_interbase.h +++ b/ext/interbase/php_interbase.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_interbase.h,v 1.71.2.1 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: php_interbase.h,v 1.71.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */ #ifndef PHP_INTERBASE_H #define PHP_INTERBASE_H |
