mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #22550 (overflow protection for upload_max_filesize ini setting).
This commit is contained in:
parent
4f4f0a9771
commit
4e6997ddf9
@ -861,7 +861,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
|
||||
|
||||
while (!cancel_upload && (blen = multipart_buffer_read(mbuff, buff, sizeof(buff) TSRMLS_CC)))
|
||||
{
|
||||
if (total_bytes > PG(upload_max_filesize)) {
|
||||
if (PG(upload_max_filesize) > 0 && total_bytes > PG(upload_max_filesize)) {
|
||||
sapi_module.sapi_error(E_WARNING, "upload_max_filesize of %ld bytes exceeded - file [%s=%s] not saved", PG(upload_max_filesize), param, filename);
|
||||
cancel_upload = UPLOAD_ERROR_A;
|
||||
} else if (max_file_size && (total_bytes > max_file_size)) {
|
||||
|
Loading…
Reference in New Issue
Block a user