mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
e19b107642
When rand is called with a range exceeding UINT32_MAX (e.g., rand(2..4294967297)), the span value could overflow when cast to uint32_t, causing division by zero in the modulo operation. Add 64-bit path for MRB_INT64 builds that combines two 32-bit randoms when the range exceeds 32 bits. Found by ClusterFuzz (oss-fuzz/mruby_fuzzer). Co-authored-by: Claude <noreply@anthropic.com>