summaryrefslogtreecommitdiff
path: root/debian/patches
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
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')
-rw-r--r--debian/patches/054-open_basedir_slash.patch13
-rw-r--r--debian/patches/055-gd_safe_mode_checks.patch32
-rw-r--r--debian/patches/104-64_bit_serialize.patch42
-rw-r--r--debian/patches/105-64_bit_imagettftext.patch17
4 files changed, 104 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';
+ }
+ }
diff --git a/debian/patches/055-gd_safe_mode_checks.patch b/debian/patches/055-gd_safe_mode_checks.patch
new file mode 100644
index 000000000..db02ad932
--- /dev/null
+++ b/debian/patches/055-gd_safe_mode_checks.patch
@@ -0,0 +1,32 @@
+===================================================================
+RCS file: /repository/php-src/ext/gd/gd.c,v
+retrieving revision 1.294.2.12
+retrieving revision 1.294.2.13
+diff -p --unified=3 -r1.294.2.12 -r1.294.2.13
+--- php-5.0.5/ext/gd/gd.c 2005/05/06 16:49:04 1.294.2.12
++++ php-5.0.5/ext/gd/gd.c 2005/10/06 20:42:56 1.294.2.13
+@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+ RETURN_FALSE;
+ }
+===================================================================
+RCS file: /repository/php-src/ext/gd/gd_ctx.c,v
+retrieving revision 1.20
+retrieving revision 1.20.2.1
+diff -p --unified=3 -r1.20 -r1.20.2.1
+--- php-5.0.5/ext/gd/gd_ctx.c 2004/01/28 16:25:12 1.20
++++ php-5.0.5/ext/gd/gd_ctx.c 2005/10/06 20:42:56 1.20.2.1
+@@ -82,7 +82,7 @@ static void _php_image_output_ctx(INTERN
+ }
+
+ if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+ RETURN_FALSE;
+ }
diff --git a/debian/patches/104-64_bit_serialize.patch b/debian/patches/104-64_bit_serialize.patch
new file mode 100644
index 000000000..fb6994e33
--- /dev/null
+++ b/debian/patches/104-64_bit_serialize.patch
@@ -0,0 +1,42 @@
+--- php-5.0.4/ext/standard/incomplete_class.c.bug34435 2004-11-25 20:28:37.000000000 +0000
++++ php-5.0.4/ext/standard/incomplete_class.c 2005-09-09 13:00:39.000000000 +0100
+@@ -122,7 +122,7 @@
+
+ /* {{{ php_lookup_class_name
+ */
+-char *php_lookup_class_name(zval *object, size_t *nlen)
++char *php_lookup_class_name(zval *object, zend_uint *nlen)
+ {
+ zval **val;
+ char *retval = NULL;
+@@ -144,7 +144,7 @@
+
+ /* {{{ php_store_class_name
+ */
+-void php_store_class_name(zval *object, const char *name, size_t len)
++void php_store_class_name(zval *object, const char *name, zend_uint len)
+ {
+ zval *val;
+ TSRMLS_FETCH();
+--- php-5.0.4/ext/standard/php_incomplete_class.h.bug34435 2005-06-29 10:29:08.000000000 +0100
++++ php-5.0.4/ext/standard/php_incomplete_class.h 2005-09-09 13:00:31.000000000 +0100
+@@ -42,7 +42,7 @@
+
+ #define PHP_CLASS_ATTRIBUTES \
+ char *class_name; \
+- size_t name_len; \
++ zend_uint name_len; \
+ zend_bool free_class_name = 0; \
+ zend_bool incomplete_class = 0
+
+@@ -55,8 +55,8 @@
+
+ zend_class_entry *php_create_incomplete_class(TSRMLS_D);
+
+-char *php_lookup_class_name(zval *object, size_t *nlen);
+-void php_store_class_name(zval *object, const char *name, size_t len);
++char *php_lookup_class_name(zval *object, zend_uint *nlen);
++void php_store_class_name(zval *object, const char *name, zend_uint len);
+
+ #ifdef __cplusplus
+ };
diff --git a/debian/patches/105-64_bit_imagettftext.patch b/debian/patches/105-64_bit_imagettftext.patch
new file mode 100644
index 000000000..15d9018fc
--- /dev/null
+++ b/debian/patches/105-64_bit_imagettftext.patch
@@ -0,0 +1,17 @@
+===================================================================
+RCS file: /repository/php-src/ext/gd/gd.c,v
+retrieving revision 1.307
+retrieving revision 1.308
+diff -p --unified=3 -r1.307 -r1.308
+--- php-5.0.4/ext/gd/gd.c 2005/03/27 23:43:51 1.307
++++ php-5.0.4/ext/gd/gd.c 2005/04/10 21:37:16 1.308
+@@ -3109,7 +3109,8 @@ static void php_imagettftext_common(INTE
+ {
+ zval *IM, *EXT = NULL;
+ gdImagePtr im=NULL;
+- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8];
++ long col = -1, x = -1, y = -1;
++ int str_len, fontname_len, i, brect[8];
+ double ptsize, angle;
+ unsigned char *str = NULL, *fontname = NULL;
+ char *error = NULL;