From bc93c5f873246a992363dc1f7da6e1eefcc02ec0 Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Wed, 8 Nov 2023 06:32:47 +0300 Subject: [PATCH] Fixed UnixTimeGenerator collisions (#522) Closes #518 See https://github.com/symfony/symfony/pull/52367 --- src/Generator/UnixTimeGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator/UnixTimeGenerator.php b/src/Generator/UnixTimeGenerator.php index af94dec..d7c8ed4 100644 --- a/src/Generator/UnixTimeGenerator.php +++ b/src/Generator/UnixTimeGenerator.php @@ -142,7 +142,7 @@ class UnixTimeGenerator implements TimeGeneratorInterface self::$seedIndex = 21; } - self::$rand[5] = 0xffff & $carry = self::$rand[5] + (self::$seedParts[self::$seedIndex--] & 0xffffff); + self::$rand[5] = 0xffff & $carry = self::$rand[5] + 1 + (self::$seedParts[self::$seedIndex--] & 0xffffff); self::$rand[4] = 0xffff & $carry = self::$rand[4] + ($carry >> 16); self::$rand[3] = 0xffff & $carry = self::$rand[3] + ($carry >> 16); self::$rand[2] = 0xffff & $carry = self::$rand[2] + ($carry >> 16);