Review main Merged

93901[BUGFIX] Cap size measurements at PHP_INT_MAX

TYPO3com CR +2 V +2 Easy +5 −1 updated 10/08/26, 10:00

Commit message

GeneralUtility::getBytesFromSizeMeasurement() calculates with
floats and casts the result to int. Values exceeding PHP_INT_MAX,
e.g. "1e20G", wrapped around to arbitrary numbers and triggered a
warning on PHP 8.5.

The result is now capped at PHP_INT_MAX, so a huge limit stays a
huge limit instead of turning into a random or zero value.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • Benni Mack +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 913

  1. TYPO3com uploaded patch set 1 05/02/26, 07:12

  2. Garvin Hicking commented on patch set 1 05/02/26, 07:17

    Hm, but how is "0" correct then? This just replaces the wrong number then with another wrong one?
  3. core-ci voted on patch set 1 V +1 05/02/26, 07:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101379

  4. Oliver Klee commented on patch set 1 05/02/26, 20:28

    This should be covered with a regression test.
  5. Georg Ringer uploaded patch set 2 V +1 10/06/26, 15:48

  6. Georg Ringer updated the commit message in patch set 3 10/06/26, 15:50

  7. core-ci voted on patch set 2 V +1 10/06/26, 15:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110234

  8. core-ci voted on patch set 3 V +1 10/06/26, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110235

  9. Benni Mack commented on patch set 3 CR +1 V +1 10/08/26, 09:53

    Reply

    Done
  10. Oliver Klee voted on patch set 3 V +1 10/08/26, 09:58

  11. Oliver Klee voted on patch set 3 CR +1 10/08/26, 09:58

  12. Garvin Hicking voted on patch set 3 CR +2 V +2 10/08/26, 10:00

  13. Garvin Hicking merged patch set 4 10/08/26, 10:00