mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
06d6d0b0a5
Barrett and Montgomery reduction compute 2^(2k) internally where k is the modulus bit length. When this exceeds MRB_BIGINT_BIT_LIMIT, mrb_raise() via longjmp skips cleanup of allocated temporaries. Add early modulus size check before any heap allocation. Co-authored-by: Claude <noreply@anthropic.com>