mirror of
https://github.com/php/php-src.git
synced 2026-03-27 17:52:16 +01: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()