]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Use rspamd_text for subprocess callback data to avoid large allocations
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 20 Jan 2026 16:13:21 +0000 (16:13 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 20 Jan 2026 16:13:21 +0000 (16:13 +0000)
commit56ba2baed212e08559e772bf4dcf9d13d2028a38
tree0f2f4eef0720714ddbc5f51b1ad32ecdd6c09d63
parent0457fba92bd2997774c040aeec61b56e06859414
[Fix] Use rspamd_text for subprocess callback data to avoid large allocations

Replace lua_pushlstring with lua_new_text(FALSE) when passing subprocess
result data to Lua callbacks. This avoids copying potentially large buffers
(e.g., 2.7MB neural network training results) into Lua's heap, which could
cause crashes under memory pressure.
src/lua/lua_worker.c