From: Matthew Nicholson Date: Fri, 21 Oct 2011 16:41:59 +0000 (+0000) Subject: only process args that exist X-Git-Tag: 1.8.9.0-rc1~130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a16caab0e0720d9906783106650e3181bbaee443;p=thirdparty%2Fasterisk.git only process args that exist ASTERISK-18395 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@341809 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c index 378826c3c6..f302041f0b 100644 --- a/pbx/pbx_lua.c +++ b/pbx/pbx_lua.c @@ -599,7 +599,7 @@ static void lua_concat_args(lua_State *L, int start, int nargs) { int concat = 0; int i = start + 1; - if (!lua_isnil(L, start)) { + if (start <= nargs && !lua_isnil(L, start)) { lua_pushvalue(L, start); concat += 1; }