summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-09-16 18:31:07 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-09-16 18:31:07 +0000
commit9d48f6fb617f74160f10b2ffc8e896f3e1c701ab (patch)
tree385c9e47afb287b7bb039ae6ef9f05f2d6a5a7ef /ext/pdo_sqlite/sqlite_driver.c
parent1ed7d584c641246bb6cc0ecd728b880f5e536498 (diff)
downloadphp-git-9d48f6fb617f74160f10b2ffc8e896f3e1c701ab.tar.gz
MFB: Additional expand_filepath() checks
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index bf83da6793..8eff8a960c 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -677,6 +677,10 @@ static char *make_filename_safe(const char *filename TSRMLS_DC)
if (strncmp(filename, ":memory:", sizeof(":memory:")-1)) {
char *fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ if (!fullpath) {
+ return NULL;
+ }
+
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
return NULL;