#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 <span data-processor="relativetime" data-value="2026-05-02T07:12:21+00:00" > 05/02/26, 07:12 </span> -
Garvin Hicking changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-08-06T15:57:02+00:00" > 08/06/26, 15:57 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 93901 <span data-processor="relativetime" data-value="2026-10-06T15:48:21+00:00" > 10/06/26, 15:48 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 93901 <span data-processor="relativetime" data-value="2026-10-06T15:50:20+00:00" > 10/06/26, 15:50 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96526 <span data-processor="relativetime" data-value="2026-10-08T10:00:28+00:00" > 10/08/26, 10:00 </span>
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-08T10:05:09+00:00" > 10/08/26, 10:05 </span>
Applied in changeset commit:8cad522c2bb97b8d389587d531d40de985f464e1.