]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
only process args that exist
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 21 Oct 2011 16:41:59 +0000 (16:41 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 21 Oct 2011 16:41:59 +0000 (16:41 +0000)
ASTERISK-18395

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@341809 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_lua.c

index 378826c3c69b907d08a64d92fe85249059563d78..f302041f0b20da0f7d97ab5aa58e839a507afdcf 100644 (file)
@@ -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;
        }