php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #44522
Patch uploads_larger_than_2g_HEAD_v2 revision 2012-03-26 03:59 UTC by jason at infininull dot com
Patch uploads_larger_than_2g_HEAD revision 2012-03-26 03:46 UTC by jason at infininull dot com
Patch uploads_larger_than_2g revision 2012-03-24 18:41 UTC by jason at infininull dot com

Patch uploads_larger_than_2g_HEAD for *Web Server problem Bug #44522

Patch version 2012-03-26 03:46 UTC

Return to Bug #44522 | Download this patch
This patch is obsolete

Obsoleted by patches:

This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: jason@infininull.com

diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index a849ccc..ef2a806 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -42,9 +42,9 @@ static _locale_t current_locale = NULL;
 
 #define TYPE_PAIR(t1,t2) (((t1) << 4) | (t2))
 
-ZEND_API int zend_atoi(const char *str, int str_len) /* {{{ */
+ZEND_API long zend_atoi(const char *str, int str_len) /* {{{ */
 {
-	int retval;
+	long retval;
 
 	if (!str_len) {
 		str_len = strlen(str);
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index ebf959b..d198537 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -326,7 +326,7 @@ ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable
 ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC);
 ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC);
 
-ZEND_API int zend_atoi(const char *str, int str_len);
+ZEND_API long zend_atoi(const char *str, int str_len);
 ZEND_API long zend_atol(const char *str, int str_len);
 
 ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC);
diff --git a/main/SAPI.h b/main/SAPI.h
index f868f85..297b2f9 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -82,7 +82,7 @@ typedef struct {
 	char *post_data, *raw_post_data;
 	char *cookie_data;
 	long content_length;
-	uint post_data_length, raw_post_data_length;
+	uint IGNORE_post_data_length, IGNORE_raw_post_data_length;
 
 	char *path_translated;
 	char *request_uri;
@@ -113,6 +113,7 @@ typedef struct {
 	int argc;
 	char **argv;
 	int proto_num;
+	long post_data_length, raw_post_data_length;
 } sapi_request_info;
 
 
@@ -120,7 +121,7 @@ typedef struct _sapi_globals_struct {
 	void *server_context;
 	sapi_request_info request_info;
 	sapi_headers_struct sapi_headers;
-	int read_post_bytes;
+	long read_post_bytes;
 	unsigned char headers_sent;
 	struct stat global_stat;
 	char *default_mimetype;
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 5da3a99..cbc405b 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -676,8 +676,9 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
 {
 	char *boundary, *s = NULL, *boundary_end = NULL, *start_arr = NULL, *array_index = NULL;
 	char *temp_filename = NULL, *lbuf = NULL, *abuf = NULL;
-	int boundary_len = 0, total_bytes = 0, cancel_upload = 0, is_arr_upload = 0, array_len = 0;
-	int max_file_size = 0, skip_upload = 0, anonindex = 0, is_anonymous;
+	int boundary_len = 0, cancel_upload = 0, is_arr_upload = 0, array_len = 0;
+	long total_bytes = 0, max_file_size = 0;
+	int skip_upload = 0, anonindex = 0, is_anonymous;
 	zval *http_post_files = NULL;
 	HashTable *uploaded_files = NULL;
 	multipart_buffer *mbuff;
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 4643882..c6f00e2 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -503,7 +503,7 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
 	uint read_bytes = 0;
 	int tmp_read_bytes;
 
-	count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes));
+	count_bytes = MIN(count_bytes,  SG(request_info).content_length - SG(read_post_bytes));
 	while (read_bytes < count_bytes) {
 		tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes);
 		if (tmp_read_bytes <= 0) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 09:01:28 2024 UTC