]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: hlua: removing ambiguous lua_pushvalue with 0 index
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 7 Oct 2022 09:54:57 +0000 (11:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 12 Oct 2022 07:22:05 +0000 (09:22 +0200)
commitd56bebee7b56ea04b264793480a51b495644680e
treebe07b079c3cf88abc73853496989091105269c3e
parentd49b559a15a8781ba37877812d4d3ddf2cea9eb4
MINOR: hlua: removing ambiguous lua_pushvalue with 0 index

In cd341d531, I added a FIXME comment because I noticed a
lua_pushvalue with 0 index, whereas lua doc states that 0 is never
an acceptable index.

After reviewing and testing the hlua_applet_http_send_response() code,
it turns out that this pushvalue is not even needed.
So it's safer to remove it as it could lead to undefined
behavior (since it is not supported by Lua API) and it grows lua stack
by 1 for no reason.

No backport needed.
src/hlua.c