summaryrefslogtreecommitdiff
path: root/debian/patches/054-open_basedir_slash.patch
diff options
context:
space:
mode:
authorAdam Conrad <adconrad@0c3.net>2005-09-27 16:09:29 +1000
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:47 -0400
commit1c08414e74046459f4b13afb687d0689f4da103a (patch)
tree29feb83703fef5858e3b62845d616f66c04f8824 /debian/patches/054-open_basedir_slash.patch
parent8add40754de2c13f21f7ed4b33050f8cb9d15b55 (diff)
downloadphp-debian/5.0.5-2.tar.gz
Imported Debian patch 5.0.5-2debian/5.0.5-2
Diffstat (limited to 'debian/patches/054-open_basedir_slash.patch')
-rw-r--r--debian/patches/054-open_basedir_slash.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/patches/054-open_basedir_slash.patch b/debian/patches/054-open_basedir_slash.patch
new file mode 100644
index 000000000..202d06e1f
--- /dev/null
+++ b/debian/patches/054-open_basedir_slash.patch
@@ -0,0 +1,13 @@
+--- php-5.0.5/main/fopen_wrappers.c 2005-07-16 12:14:44.000000000 +0000
++++ php-5.0.5/main/fopen_wrappers.c 2005-09-26 09:07:55.000000000 +0000
+@@ -109,8 +109,8 @@
+ /* Handler for basedirs that end with a / */
+ resolved_basedir_len = strlen(resolved_basedir);
+ if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+- if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+ resolved_basedir[++resolved_basedir_len] = '\0';
+ }
+ }