BUG/MEDIUM: spoe: Unset variable instead of set it if no data provided
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 15 Oct 2020 14:08:30 +0000 (16:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2020 17:53:17 +0000 (19:53 +0200)
commit2469eba20fdc01f8ca95726a8c11feaaa8825027
tree3f1bbc6d7ed67366b2bc461fb0e21fd41b816fe1
parent7239c2498602415c1a85c4326cac8ee8330d9515
BUG/MEDIUM: spoe: Unset variable instead of set it if no data provided

If an agent try to set a variable with the NULL data type, an unset is perform
instead to avoid undefined behaviors. Once decoded, such data are translated to
a sample with the type SMP_T_ANY. It is unexpected in HAProxy. When a variable
is set with such sample, no data are attached to the variable. Thus, when the
variable is retrieved later in the transaction, the sample data are
uninitialized, leading to undefined behaviors depending on how it is used. For
instance, it leads to a crash if the debug converter is used on such variable.

This patch should fix the issue #855. It must be backported as far as 1.8.
src/flt_spoe.c