summaryrefslogtreecommitdiff
path: root/main/rfc1867.c
diff options
context:
space:
mode:
authorRalf Lang <lang@b1-systems.de>2013-06-28 08:32:10 +0200
committerMichael Wallner <mike@php.net>2013-08-06 22:51:57 +0200
commit84f9213e00ae624e789ec0ed8f023c22a557d215 (patch)
tree31506b97edd76830435996241eaaf84425c925c4 /main/rfc1867.c
parent14caf174ff219376e4f1234bd297ffe973cc416e (diff)
downloadphp-git-84f9213e00ae624e789ec0ed8f023c22a557d215.tar.gz
Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files
above 2G. This is essentially the same as the patch "uploads_larger_than_2g_HEAD_v2 (last revision 2012-03-26 03:59 UTC) by jason at infininull dot com)" but using off_t instead of signed long (originally: uint) I tested this on 64bit linux and succeeded uploading a file of 4.8 G. The File did not get corrupted or truncated in any way. I did not yet test this under windows or 32 bit linux Note that there are still limitations: * Did not test for files > 8 G * php does not yet reject absurdly high values * Still limited by underlying file system specific limits and free space * in upload * tmp dir and destination dir
Diffstat (limited to 'main/rfc1867.c')
-rw-r--r--main/rfc1867.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c
index ed7ce9c0c1..78a7ad2794 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;
+ off_t 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;