summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-09-16 18:30:03 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-09-16 18:30:03 +0000
commit92c3cfd81fcdc798171926ff1299fdfc83bf3f6f (patch)
treeccd7016542e077986019a6ce2d6cfc1e1bd23ff3 /ext/pdo_sqlite/sqlite_driver.c
parent557b583434a4d83e494d9ae5cb926954a419c8b7 (diff)
downloadphp-git-92c3cfd81fcdc798171926ff1299fdfc83bf3f6f.tar.gz
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 ebe3170ead..a3c9cd5911 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -642,6 +642,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 (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
efree(fullpath);
return NULL;