diff options
Diffstat (limited to 'ext/odbc')
| -rw-r--r-- | ext/odbc/birdstep.c | 6 | ||||
| -rw-r--r-- | ext/odbc/php_odbc.c | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c index 111eb0a80c..63125fd836 100644 --- a/ext/odbc/birdstep.c +++ b/ext/odbc/birdstep.c @@ -224,11 +224,11 @@ PHP_MSHUTDOWN_FUNCTION(birdstep) /* Some internal functions. Connections and result manupulate */ -static int birdstep_add_conn(HashTable *list,VConn *conn,HDBC hdbc) +static int birdstep_add_conn(HashTable *list,VConn *conn,HDBC hdbc TSRMLS_DC) { int ind; - ind = zend_list_insert(conn,php_birdstep_module.le_link); + ind = zend_list_insert(conn,php_birdstep_module.le_link TSRMLS_CC); conn->hdbc = hdbc; conn->index = ind; @@ -314,7 +314,7 @@ PHP_FUNCTION(birdstep_connect) RETURN_FALSE; } new = (VConn *)emalloc(sizeof(VConn)); - ind = birdstep_add_conn(list,new,hdbc); + ind = birdstep_add_conn(list,new,hdbc TSRMLS_CC); php_birdstep_module.num_links++; RETURN_LONG(ind); } diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index dc62631d69..e98d863be9 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1317,18 +1317,12 @@ PHP_FUNCTION(odbc_execute) if (Z_STRLEN_PP(tmp) > 2 && Z_STRVAL_PP(tmp)[0] == '\'' && Z_STRVAL_PP(tmp)[Z_STRLEN_PP(tmp) - 1] == '\'') { - if (strlen(tmp) != Z_STRLEN_PP(tmp)) { + + if (CHECK_ZVAL_NULL_PATH(*tmp)) { RETURN_FALSE; } - filename = estrndup(&Z_STRVAL_PP(tmp)[1], Z_STRLEN_PP(tmp) - 2); - - /* Check for safe mode. */ - if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - efree(filename); - efree(params); - RETURN_FALSE; - } + filename[strlen(filename)] = '\0'; /* Check the basedir */ if (php_check_open_basedir(filename TSRMLS_CC)) { |
