From: Daniel Gruno Date: Tue, 18 Mar 2014 13:32:36 +0000 (+0000) Subject: mod_lua: Actually check whether interpreting the base structure of a file works or... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9966cfbe2db4a1c9a43022b53cf16aa03b40c8e7;p=thirdparty%2Fapache%2Fhttpd.git mod_lua: Actually check whether interpreting the base structure of a file works or not, don't just assume it works. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578870 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_vmprep.c b/modules/lua/lua_vmprep.c index 2bd0365f81f..a995c7ef1ae 100644 --- a/modules/lua/lua_vmprep.c +++ b/modules/lua/lua_vmprep.c @@ -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