diff options
author | Pierre Joye <pajoye@php.net> | 2010-11-18 15:22:22 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-11-18 15:22:22 +0000 |
commit | ce96fd6b0761d98353761bf78d5bfb55291179fd (patch) | |
tree | 0b66c858477f5ac7472bf35b842f89cdf4dce151 /ext/pgsql | |
parent | 75631ab8ac231f141286428fd871ad31f2d71588 (diff) | |
download | php-git-ce96fd6b0761d98353761bf78d5bfb55291179fd.tar.gz |
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
Diffstat (limited to 'ext/pgsql')
-rw-r--r-- | ext/pgsql/pgsql.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 90231c2ab5..3308e95716 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3339,6 +3339,10 @@ PHP_FUNCTION(pg_lo_import) WRONG_PARAM_COUNT; } + if (strlen(file_in) != name_len) { + RETURN_FALSE; + } + if (PG(safe_mode) &&(!php_checkuid(file_in, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; } @@ -3476,6 +3480,10 @@ PHP_FUNCTION(pg_lo_export) RETURN_FALSE; } + if (strlen(file_out) != name_len) { + RETURN_FALSE; + } + if (PG(safe_mode) &&(!php_checkuid(file_out, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; } |