[php-src] PR #22435: Fix GH-17384: Reject too large number_format decimals

From: Date: Wed, 24 Jun 2026 12:21:00 +0000
Subject: [php-src] PR #22435: Fix GH-17384: Reject too large number_format decimals
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36604@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22435 Author: LamentXU123 number_format($number, 9876543210); is now silently equals to number_format($number, 2147483647); and generates 2147483647 decimal places and eat up 2 GB memory (and exhaust almost half of them which cause a fatal error). I only reject very large positive numbers here (as every input larger than 2147483647 is silently turned into 2147483647). Because negative ones is always returning 0 anyways and only very large positive numbers can cause to such problems. Fixes #17384

« previous php.git-pulls (#36604) next »