]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Use null-terminated string for symbol lookup in composite dependency analysis 5681/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 14 Oct 2025 14:38:39 +0000 (15:38 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 14 Oct 2025 14:38:39 +0000 (15:38 +0100)
commitb15da9ccc9c1311db5fb6d78203808ef10a227f8
treedcf0457e6a62c0964313ac77455eecfcac2226db
parentac8d5173cce870872aec7c54a42a2f379d3f6719
[Fix] Use null-terminated string for symbol lookup in composite dependency analysis

In composite_dep_callback, atom->begin from rspamd_ftok_t is not null-terminated,
but was being passed directly to symbol_needs_second_pass() which calls
rspamd_symcache_get_symbol_flags() expecting a null-terminated C string.

This could cause incorrect symbol lookups or undefined behavior. Fix by creating
a std::string to ensure null-termination before passing to the C API.
src/libserver/composites/composites_manager.cxx