]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Fix allocation of the control buffer
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 28 Sep 2025 21:06:01 +0000 (22:06 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 28 Sep 2025 21:06:01 +0000 (22:06 +0100)
commitfc75a6859bad83b4e777049e482e91b605dada01
tree16866cb9aca9a70d735475898e25344111ea0fbb
parentb74a05d722cb44c9caaed30c366ae3ea99ef8264
[Fix] Fix allocation of the control buffer

* Refactored rspamd_control_fill_msghdr to accept
  a caller-provided control buffer, fixing the
  lifetime bug where a pointer to a local array
  was stored in msg_control.
* Replaced static buffers with automatic (stack)
  buffers at the exact call sites of sendmsg/recvmsg,
  so PowerPC and similar platforms won’t choke on
  non-constant expressions.

Issue: #5637
src/libserver/rspamd_control.c