Bug #78987 [PATCH]: Memory problems running finfo::buffer with PHP_CLI

From: Date: Wed, 23 Jun 2021 08:40:01 +0000
Subject: Bug #78987 [PATCH]: Memory problems running finfo::buffer with PHP_CLI
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234600@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78987&edit=1 ID: 78987 Patch added by: andrei@davisinfo.ro Reported by: jhhillie at amazon dot com Summary: Memory problems running finfo::buffer with PHP_CLI Status: Verified Type: Bug Package: Filesystem function related Operating System: Ubuntu PHP Version: 7.4Git-2019-12-18 (Git) Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Fix #78987 - Memory problems running finfo::buffer On GitHub: https://github.com/php/php-src/pull/7187 Patch: https://github.com/php/php-src/pull/7187.patch Previous Comments: ------------------------------------------------------------------------ [2021-06-23 07:01:16] andrei at davisinfo dot ro It was fixed on master because code was updated to file version 5.40 which fixes this issue but I think applying the fix to earlier versions would be a good idea also. ------------------------------------------------------------------------ [2021-06-23 06:48:35] andrei at davisinfo dot ro The following patch has been added/updated: Patch Name: fix-encoding-memory-allocation-too-big Revision: 1624430915 URL: https://bugs.php.net/patch-display.php?bug=78987&patch=fix-encoding-memory-allocation-too-big&revision=1624430915 ------------------------------------------------------------------------ [2021-06-16 11:07:59] info at it-can dot nl any news on this bug and the fix? ------------------------------------------------------------------------ [2021-02-06 06:58:26] halaeiv at gmail dot com I have reported to bug to file package https://bugs.astron.com/view.php?id=234 and they fixed it really quickly: "file_buffer(3) passed the full size of the buffer to the encoding determination function. If the file was too large, we ended up allocating (2 * size + 4 * size) buffers to scan for encoding. Now we limit size to 64K." Can we have this fix in PHP soon? Thanks ------------------------------------------------------------------------ [2021-02-04 11:00:18] halaeiv at gmail dot com I have a quick question. If it is libmagic bug how come the bug exists in php-7.4 but not php-7.2? Both are installed via ondrej/php in Ubuntu and both packages depend on the same libmagic1. If 2 php versions depends on the same shared library and one has a bug, doesn't this mean the bug is actually not in the shared library? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=78987 -- Edit this bug report at https://bugs.php.net/bug.php?id=78987&edit=1

« previous php.bugs (#234600) next »