]> granicus.if.org Git - apache/commitdiff
mod_lua: Actually check whether interpreting the base structure of a file works or...
authorDaniel Gruno <humbedooh@apache.org>
Tue, 18 Mar 2014 13:32:36 +0000 (13:32 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Tue, 18 Mar 2014 13:32:36 +0000 (13:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578870 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_vmprep.c

index 2bd0365f81f510c2fc86f6e47989c2711cd4f586..a995c7ef1ae834ad25e50d0aaadb6e6883924d9c 100644 (file)
@@ -370,7 +370,12 @@ static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifec
                                            : lua_tostring(L, 0));
             return APR_EBADF;
         }
-        lua_pcall(L, 0, LUA_MULTRET, 0);
+        if ( lua_pcall(L, 0, LUA_MULTRET, 0) == LUA_ERRRUN ) {
+            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(01482)
+                          "Error loading %s: %s", spec->file,
+                            lua_tostring(L, -1));
+            return APR_EBADF;
+        }
     }
 
 #ifdef AP_ENABLE_LUAJIT