]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua: fix unsafe hlua_pusherror() usage
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 4 Jun 2024 11:08:59 +0000 (13:08 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 4 Jun 2024 14:31:09 +0000 (16:31 +0200)
commitf0e5b825cfba3ad710818e46c048ca296978283a
treefa715b1eab0a3dc5f48c7282303d8346b897f90d
parentc0a3c1281fac10ca7a590a4c34d102c8040e97a5
BUG/MINOR: hlua: fix unsafe hlua_pusherror() usage

Following previous commit's logic: hlua_pusherror() is mainly used
from cleanup paths where the caller isn't protected against LJMPs.

Caller was tempted to think that the function was safe because func
prototype was lacking the __LJMP prefix.

Let's make the function really LJMP-safe by wrapping the sensitive calls
under lua_pcall().

This may be backported to all stable versions.
src/hlua.c