]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM lua: Add missing call to RESET_SAFE_LJMP in hlua_filter_new()
authorTim Duesterhus <tim@bastelstu.be>
Sat, 11 Sep 2021 21:17:25 +0000 (23:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 12 Sep 2021 06:21:07 +0000 (08:21 +0200)
In one case before exiting leaving the function the panic handler was not
reset.

Introduced in 69c581a09271e91d306e7b9080502a36abdc415e, which is 2.5+.
No backport required.

src/hlua.c

index 72d232491a2478ea35f0fc22f4c8085ca64351e3..915356c09b0cbc5e30aaf9c7934e4ebcffc66a5d 100644 (file)
@@ -10005,6 +10005,7 @@ static int hlua_filter_new(struct stream *s, struct filter *filter)
                /* Check stack size. */
                if (!lua_checkstack(s->hlua->T, 1)) {
                        SEND_ERR(s->be, "Lua filter '%s': full stack.\n", conf->reg->name);
+                       RESET_SAFE_LJMP(s->hlua);
                        ret = 0;
                        goto end;
                }