BUG/MINOR: lua: initialize sample before using it
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 29 Oct 2020 16:21:20 +0000 (17:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Nov 2020 15:17:43 +0000 (16:17 +0100)
commit41c39636c40cfd8d997f2361ddf58ee16064c905
tree3d98aefeb0c7e858159fe5c48eff2b6e01e8d4d0
parentdd491cd7393107b6f0300040c1bcca03b78c9d34
BUG/MINOR: lua: initialize sample before using it

Memset the sample before using it through hlua_lua2smp. This function is
ORing the smp.flags, so this field need to be cleared before its use.
This was reported by a coverity warning.

Fixes the github issue #929.
This bug can be backported up to 1.8.

(cherry picked from commit bc0af6a19947c7ab76bd226beaaaafedc0648be4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 42cd304165f9afa2050f169e7c852f2f637bcc70)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/hlua.c