]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua_fcn: ensure Patref:add_bulk() is given a table object before using it
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 12 Jan 2026 16:23:27 +0000 (17:23 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 12 Jan 2026 16:30:54 +0000 (17:30 +0100)
commitfcd4d4a7aad2102cc4de5a6fe395820287f80c32
tree67bfb61c899fba9a0cf7373f4b46658a8146ba5e
parent04545cb2b718286aa917d5aa80579fff305caf06
BUG/MINOR: hlua_fcn: ensure Patref:add_bulk() is given a table object before using it

As reported by GH user @kanashimia in GH #3241, providing anything else
than a table to Patref:add_bulk() method could cause a segfault because
we were calling lua_next() with the lua object without ensuring it
actually is a table.

Let's add the missing lua_istable() check on the stack object before
calling lua_next() function on it.

It should be backported up to 3.2 with 884dc62 ("MINOR: hlua_fcn:
add Patref:add_bulk()")
src/hlua_fcn.c