mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
75738a350a
mpz_abs() internally allocates via mpz_init_heap(), so pre-allocating abs_x/abs_y with mpz_init_temp() leaked the original allocations. let mpz_abs() handle allocation directly. also use divide-first formula (abs_x/gcd)*abs_y to reduce intermediate product size, and add bint_norm() for the result. reported by OSS-Fuzz (clusterfuzz-testcase-6501272051318784). Co-authored-by: Claude <noreply@anthropic.com>