Files
mruby-mruby/mrbgems
Yukihiro "Matz" Matsumoto d7ef4355a9 mruby-bigint: improve memory management with bounds checking and safety
Add overflow protection and memory safety improvements to bigint operations:

- Add overflow check in mpz_realloc to prevent integer overflow in size calculations
- Fix zero-initialization loop by preserving original size during reallocation
- Improve mpz_clear to prevent double-free by nullifying pointer after free
- Add bounds checking to mpz_get_str for string conversion buffer allocation
- Add documentation comments clarifying memory allocation strategies
- Add helper macros MPZ_TMP_INIT/CLEAR for safer temporary variable management

These changes prevent potential memory corruption, buffer overflows, and crashes
while maintaining full compatibility with existing bigint functionality.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-14 10:52:43 +09:00
..
2025-06-08 17:00:07 +09:00
2025-06-09 17:13:20 +09:00
2025-07-18 15:00:44 +09:00
2025-06-08 17:02:55 +09:00
2024-09-24 00:14:24 +10:00