Bug #64888 [Fbk->NoF]: Integer Overflow when processing MAX_FILE_SIZE
| From: | php-bugs at lists dot php dot net | Date: | Sun, 21 Aug 2016 04:22:23 +0000 |
| Subject: | Bug #64888 [Fbk->NoF]: Integer Overflow when processing MAX_FILE_SIZE | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203432@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64888&edit=1
ID: 64888
Updated by: php-bugs@lists.php.net
Reported by: php at paalsteek dot de
Summary: Integer Overflow when processing MAX_FILE_SIZE
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: FPM related
Operating System: Arch Linux
PHP Version: 5.4.15
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2016-08-08 17:05:05] cmb@php.net
> Therefore I guess this is an implementation specific problem of
> php-fpm.
I'm not sure. It might as well be related to respective variables
being defined as int[1] (whose size is platform specific). This
has changed, however, as of PHP 5.6.0 to int64_t[2].
Has this change solved the issue for you?
[1] <https://github.com/php/php-src/blob/PHP-5.5/main/rfc1867.c#L683>
[2] <https://github.com/php/php-src/blob/PHP-5.6.0/main/rfc1867.c#L685>
------------------------------------------------------------------------
[2013-05-21 13:10:16] php at paalsteek dot de
Description:
------------
When uploading files I get an error UPLOAD_ERR_FORM_SIZE when setting MAX_FILE_SIZE in the input
form to values greater or equal to 2147483648 (2^31).
This problem does not exist on a CentOS 6.4 using Apache 2.2.15. Therefore I guess this is an
implementation specific problem of php-fpm.
Test script:
---------------
HTML form:
<html>
<body>
<form action="https://owncloud.paalsteek.de/test.php"
method="post" enctype="multipart/form-data">
<input id="max_upload" type="hidden" value="2147483648"
name="MAX_FILE_SIZE" original-title="">
<input id="requesttoken" type="hidden" value="013ac1f5ecd5e025b1ee"
name="requesttoken" original-title="">
<input class="max_human_file_size" type="hidden" value="(max 2.3
GB)" original-title="">
<input id="dir" type="hidden" value="/" name="dir"
original-title="">
<input type="file" name="test" />
<input type="submit" />
</form>
</body>
</html>
PHP code:
<?php
var_dump($_FILES["test"]["error"]);
?>
Expected result:
----------------
int(0)
Actual result:
--------------
int(2)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64888&edit=1