summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-06-06 21:28:16 (GMT)
committerFelipe Pena <felipe@php.net>2011-06-06 21:28:16 (GMT)
commit4737910b69eba83b5ba6dd2d43f88a7bd3461ccf (patch)
treedc6ecafe9a79a17cbb6d4a96b83a1bcbda30e5a8 /ext/odbc
parent6b85eb58b27a60cfc4d78ad0a85afeda373132c5 (diff)
downloadphp-4737910b69eba83b5ba6dd2d43f88a7bd3461ccf.tar.gz
- Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
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';