[Pkg-php-commits] [php/debian-sid] Cherry pick patch to correctly determine length of doc_root

Raphael Geissert geissert at debian.org
Wed May 5 21:06:32 UTC 2010


---
 debian/patches/series                              |    1 +
 .../patches/upstream/incorrect_docroot_eval.patch  |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/upstream/incorrect_docroot_eval.patch

diff --git a/debian/patches/series b/debian/patches/series
index e12ea7f..a0ab380 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -65,3 +65,4 @@ session_save_path.patch
 upstream/multiple_typos.patch
 upstream/db4.8_workarounds.patch
 upstream/mssql_per_query_timeout.patch
+upstream/incorrect_docroot_eval.patch
diff --git a/debian/patches/upstream/incorrect_docroot_eval.patch b/debian/patches/upstream/incorrect_docroot_eval.patch
new file mode 100644
index 0000000..47049be
--- /dev/null
+++ b/debian/patches/upstream/incorrect_docroot_eval.patch
@@ -0,0 +1,20 @@
+Description: Correctly determine the length of doc_root for its
+ evaluation.
+Origin: http://svn.php.net/viewvc?view=revision&revision=298277
+Last-Update: 2010-05-02
+
+Index: php/main/fopen_wrappers.c
+===================================================================
+--- php.orig/main/fopen_wrappers.c
++++ php/main/fopen_wrappers.c
+@@ -430,8 +430,8 @@ PHPAPI int php_fopen_primary_script(zend
+ 		}
+ 	} 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);
-- 
1.6.5





More information about the Pkg-php-commits mailing list