diff options
Diffstat (limited to 'ext/odbc/php_odbc.c')
-rw-r--r-- | ext/odbc/php_odbc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 8e555ff9d2..52d46b2fd0 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 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 | @@ -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)) { |