]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: lua: Don't crash in hlua_lua2arg_check on failure
authorOlivier Houchard <cognet@ci0.org>
Mon, 12 Sep 2022 22:31:17 +0000 (00:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Oct 2022 17:08:10 +0000 (19:08 +0200)
commitca43161a8da278ec0948511f595827daf29a071e
treef30f281cb8feeb635fa5d27bfbdedf059f132267
parentd7755375a51726e3d13c4f891ca8ab8cc1ba9a4d
BUG/MEDIUM: lua: Don't crash in hlua_lua2arg_check on failure

In hlua_lua2arg_check(), on failure, before calling free_argp(), make
sure to always mark the failed argument as ARGT_STOP. We only want to
free argument prior to that point, because we did not allocate the
strings after this one, and so we don't want to free them.

This should be backported up to 2.2.
src/hlua.c