Fix RandomNodeProvider: change the max value in mt_rand() call to prevent invalid node generation

This commit is contained in:
Anton Vasetskiy
2016-07-28 16:44:26 +03:00
parent be0a40fec1
commit 879fe3cfe2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -31,6 +31,6 @@ class RandomNodeProvider implements NodeProviderInterface
*/
public function getNode()
{
return sprintf('%06x%06x', mt_rand(0, 1 << 24), mt_rand(0, 1 << 24));
return sprintf('%06x%06x', mt_rand(0, 0xffffff), mt_rand(0, 0xffffff));
}
}