summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/php_odbc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index a036d3b..5275a35 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1317,6 +1317,10 @@ 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 (CHECK_ZVAL_NULL_PATH(*tmp)) {
+ RETURN_FALSE;
+ }
filename = estrndup(&Z_STRVAL_PP(tmp)[1], Z_STRLEN_PP(tmp) - 2);
filename[strlen(filename)] = '\0';