diff options
author | Felipe Pena <felipe@php.net> | 2010-04-21 22:22:31 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-04-21 22:22:31 +0000 |
commit | ee185c604a33bedcca0a5d93f084002342578fbe (patch) | |
tree | a016a00d0bb2b121e7555865088aa3c373a0162a | |
parent | 5a7786c63fa6609bcda967385a81452567292807 (diff) | |
download | php-git-ee185c604a33bedcca0a5d93f084002342578fbe.tar.gz |
- Fixed bug #51627 (script path not correctly evaluated)
Patch by: russell dot tempero at rightnow dot com
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | main/fopen_wrappers.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -18,6 +18,8 @@ PHP NEWS requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas) +- Fixed bug #51627 (script path not correctly evaluated). + (russell dot tempero at rightnow dot com) - Fixed bug #51615 (PHP crash with wrong HTML in SimpleXML). (Felipe) - Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter). (Felipe) diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index f7bd5107e1..70ae442655 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -435,8 +435,8 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC) } } else #endif - if (PG(doc_root) && path_info && (length = strlen(PG(doc_root)) && - IS_ABSOLUTE_PATH(PG(doc_root), length))) { + if (PG(doc_root) && path_info && (length = strlen(PG(doc_root))) && + IS_ABSOLUTE_PATH(PG(doc_root), length)) { filename = emalloc(length + strlen(path_info) + 2); if (filename) { memcpy(filename, PG(doc_root), length); |