diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-09-16 18:31:07 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-09-16 18:31:07 +0000 |
| commit | 9d48f6fb617f74160f10b2ffc8e896f3e1c701ab (patch) | |
| tree | 385c9e47afb287b7bb039ae6ef9f05f2d6a5a7ef /ext/pdo_sqlite/sqlite_driver.c | |
| parent | 1ed7d584c641246bb6cc0ecd728b880f5e536498 (diff) | |
| download | php-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.c | 4 |
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; |
