From: Thierry Fournier Date: Fri, 27 May 2016 14:35:01 +0000 (+0200) Subject: BUG/MEDIUM: lua: converters doesn't work X-Git-Tag: v1.7-dev4~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a53bfdc1de46c78a23eabdefc4b418cff7d0403;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: lua: converters doesn't work The number of arguments pushed in the stack are false, so we try to execute a function out of the stack. This function is always a nil pointer, so the following message is displayed. Lua converter 'testconv': runtime error: attempt to call a nil value. Thanks Michael Ezzell for the repporting. This patch must be backported in the 1.6 version. --- diff --git a/src/hlua.c b/src/hlua.c index 94f97429c8..953c219bdf 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -5163,7 +5163,7 @@ static int hlua_sample_conv_wrapper(const struct arg *arg_p, struct sample *smp, return 0; } hlua_smp2lua(stream->hlua.T, smp); - stream->hlua.nargs = 2; + stream->hlua.nargs = 1; /* push keywords in the stack. */ if (arg_p) {