Bug #64888 [Opn->Fbk]: Integer Overflow when processing MAX_FILE_SIZE

From: Date: Mon, 08 Aug 2016 17:05:07 +0000
Subject: Bug #64888 [Opn->Fbk]: Integer Overflow when processing MAX_FILE_SIZE
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203092@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: cmb@php.net Reported by: php at paalsteek dot de Summary: Integer Overflow when processing MAX_FILE_SIZE -Status: Open +Status: Feedback Type: Bug Package: FPM related Operating System: Arch Linux PHP Version: 5.4.15 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > 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> Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#203092) next »