mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
27c9037d48
Fix two functions that could create bigints with sn != 0 but value of 0: - mpz_mod_limb: single-limb case set r->sn = x->sn even when result was 0 - mpz_mul_2exp: set z->sn = sn unconditionally after zero-producing ops This inconsistent state caused GCD loop (!zero_p(&b)) to continue with a zero divisor, eventually causing FPE in mpz_mod_limb with m = 0. Co-authored-by: Claude <noreply@anthropic.com>