#109741fix size calculation overflow for large inputs
Description
## Summary
Fix incorrect size calculation for large values in `GeneralUtility::getBytesFromSizeMeasurement()`.
—-
## Problem
Large inputs (e.g. `“1e20G”`) can overflow during float-based multiplication, producing incorrect integer results.
Example:
Input: `“1e20G”`
Before: `6396237370772946944` (incorrect)
—-
## Fix
Add a pre-multiplication overflow guard:
if ($bytes > intdiv(PHP_INT_MAX, MULTIPLIER)) {
return 0;
}
—-
## Impact
-No change for valid inputs
-Prevents incorrect values for extreme inputs
This issue was automatically created from https://github.com/TYPO3/typo3/pull/633
Reviews 2
History 26
-
Gerrit Code Review pushed patch set 1 for main to change 93901 status
NewUnder Review 05/02/26, 07:12 -
Garvin Hicking changed Sprint Focus On Location Sprint 08/06/26, 15:57
-
Gerrit Code Review pushed patch set 2 for main to change 93901 10/06/26, 15:48
-
Gerrit Code Review pushed patch set 3 for main to change 93901 10/06/26, 15:50
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96526 10/08/26, 10:00
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 10/08/26, 10:05
Applied in changeset commit:8cad522c2bb97b8d389587d531d40de985f464e1.