]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Harden PDF and Lua utility functions vstakhov-pdf-text 5762/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 25 Nov 2025 10:43:20 +0000 (10:43 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 25 Nov 2025 10:43:20 +0000 (10:43 +0000)
commitc454c68d3ced61302ea1a246796b97b219ecb917
tree4288bd32e6c7e35a377da6a5f5a2d04c6eb7b2be
parentce10914cb7977960e11269a9e569a43645b46805
[Fix] Harden PDF and Lua utility functions

- lua_util_to_utf8: prevent integer overflow in buffer calculation,
  check for negative length from ucnv_convert
- lua_task_inject_part: validate all table entries before processing
- pdf.lua: refactor recursive flatten to iterative with depth limit,
  add input validation in apply_pdf_filter, reduce timeout to 2s,
  skip text extraction on timeout as results would be incomplete
lualib/lua_content/pdf.lua
src/lua/lua_task.c
src/lua/lua_util.c