Yukihiro "Matz" Matsumoto
7dfd560df8
mruby-io: cap puts recursion depth to prevent C stack overflow
...
io_puts_ary recursed unconditionally on nested arrays. For cyclic
arrays (a = []; a << a; puts a) or pathologically deep arrays,
this caused a C stack overflow.
Add a depth cap (IO_PUTS_MAX_DEPTH = 16); on overflow, write
"[...]\n" and return, matching CRuby's behavior on cycles. The
pattern mirrors mruby-set's MAX_NESTED_DEPTH for the same problem
shape (pure C recursion not dispatched as a Ruby method).
Reported by OSS-Fuzz (clusterfuzz testcase 6233530857488384).
Co-authored-by: Claude <noreply@anthropic.com >
2026-05-02 11:27:01 +09:00
..
2026-04-23 19:25:38 +09:00
2026-04-23 19:25:37 +09:00
2026-04-23 19:25:36 +09:00
2026-04-23 19:25:38 +09:00
2026-04-23 19:25:38 +09:00
2026-04-23 19:25:37 +09:00
2026-04-23 18:59:05 +09:00
2025-12-11 18:09:09 +09:00
2026-04-28 12:56:25 +09:00
2026-04-25 19:57:44 +09:00
2026-04-19 21:17:18 +09:00
2026-04-23 19:25:35 +09:00
2026-04-23 19:25:23 +09:00
2025-12-11 18:09:10 +09:00
2026-03-09 16:50:58 +09:00
2025-12-11 18:09:10 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2025-08-14 10:52:49 +09:00
2026-04-28 12:56:25 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-04-23 19:25:37 +09:00
2026-03-09 16:50:58 +09:00
2025-12-11 18:09:06 +09:00
2025-12-11 18:09:09 +09:00
2026-04-23 19:25:25 +09:00
2025-12-11 18:09:07 +09:00
2026-04-23 19:25:21 +09:00
2026-03-09 16:50:58 +09:00
2025-11-08 14:26:49 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-05-02 11:27:01 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-04-13 13:11:27 +02:00
2026-03-24 22:16:15 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2025-06-24 13:56:07 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-04-13 13:11:27 +02:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-04-23 19:25:39 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-04-24 08:19:04 +09:00
2026-04-28 12:56:07 +09:00
2026-03-09 16:50:58 +09:00
2026-04-10 14:44:46 +09:00
2026-03-09 16:50:58 +09:00
2026-03-09 16:50:58 +09:00
2026-04-23 23:16:21 +09:00
2026-03-25 15:32:36 +09:00
2024-09-24 00:14:24 +10:00
2026-03-09 16:50:58 +09:00
2025-08-14 10:52:47 +09:00
2021-01-06 18:10:21 +09:00
2021-01-06 18:10:21 +09:00
2023-04-04 19:31:42 +10:00
2025-10-08 23:55:21 +09:00
2025-05-14 15:58:23 +09:00
2025-05-14 15:58:24 +09:00
2022-11-29 15:58:05 +09:00
2026-04-23 19:25:21 +09:00
2026-04-23 19:25:29 +09:00