mirror of
https://github.com/php/php-src.git
synced 2026-04-01 13:12:16 +02:00
* Fix shift in rand_range??() The last generated size is in bytes, whereas the shift is in bits. Multiple the generated size by 8 to correctly handle each byte once. * Correctly handle user engines returning less than 4 bytes in rand_rangeXX() We need to loop until we accumulate sufficient bytes, instead of just checking once. The version in the rejection loop was already correct. * Clean up some repetition in rand_rangeXX()