]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: spoe: Fix the message list splice with an empty list
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 19:18:29 +0000 (21:18 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:35 +0000 (16:17 +0200)
commit34232a448c2759f0f1bc0b66967d2a2ff39c9e82
tree827b3edc5ebadc1c55c4b475788f4fed9bc6bd07
parentfcba844c55ebbab61a888472d5a162453e87679a
BUG/MINOR: spoe: Fix the message list splice with an empty list

At the end of the parsing of a SPOE agent configuration file, the messages
of the file are moved to the agent message list with a manual splice.
However, this is only correct when the file defines at least one
"spoe-message" section. With an empty list, the manual splice will corrupt
the agent message list.

Replace the manual splice with LIST_SPLICE(), which does nothing with an
empty source list. This fixes the bug and this avoids to deal with list
pointers manually.

The regression was introduced by the commit 11610f3 ("MEDIUM: spoe: Parse
new "spoe-group" section in SPOE config file").

The patch must be backported to all supported versions.
src/flt_spoe.c