1
0
mirror of https://github.com/php/php-src.git synced 2026-04-01 21:22:13 +02:00
Files
archived-php-src/ext
Tim Düsterhus 804c3fc821 Fix byte expansion in rand_rangeXX() (#9056)
* 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()
2022-07-20 17:33:10 +02:00
..
2022-06-25 07:40:19 +01:00
2022-07-04 10:50:32 +01:00
2022-06-29 14:04:40 +02:00
2022-07-08 17:39:05 +01:00
2022-07-20 17:01:42 +02:00
2022-06-10 12:45:30 -04:00
2022-07-11 19:45:46 +02:00
2022-06-09 13:42:45 +02:00
2022-06-13 14:44:49 +02:00
2022-07-19 10:27:38 +01:00
2022-07-19 10:27:38 +01:00
2022-07-19 10:27:38 +01:00
2021-08-18 16:39:36 +02:00
2021-07-20 12:28:35 +02:00
2022-05-16 14:47:02 +02:00
2021-10-12 16:43:40 +02:00
2022-06-25 07:40:19 +01:00