]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] async_session: review fixes — redis label safety, overflow naming 5990/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 18 Apr 2026 16:33:07 +0000 (17:33 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 18 Apr 2026 16:33:07 +0000 (17:33 +0100)
commitafbd97cbadebc050ed94dc1567451d661fe02957
treeee16b7cdb85f80f4f5b2c863c53fad0b204af832
parentcc9390248a232f5319154b85f7140ea8a98eddea
[Fix] async_session: review fixes — redis label safety, overflow naming

- lua_redis: args[0] is allocated as g_malloc(arglens[0]) + memcpy and
  is NOT NUL-terminated, so reusing it as a diagnostic label (read
  later via %s) could read past the buffer. Store a dedicated
  g_strdup'd copy of the command in sp_ud->cmd and use that for the
  event label; free it alongside args in the dtor.
- async_session: the overflow counter increments once per event that
  could not be placed into the first 32 dump groups, not once per
  lost group. Rename overflow_groups -> overflow_events and reword
  the suffix to "(+N events not shown)" so the message matches
  reality (the lost events may belong to any number of groups).
src/libserver/async_session.c
src/lua/lua_redis.c